by willtim · 9y ago · 0 comments
I'm still not convinced C++ is necessary to outperform Spark, especially as high-level features like reference counting and lambdas are being used.
Reference counting is used on very large objects or for things that aren't touched a lot, so there is no measurable impact on performance or memory use.
Lambdas don't have any performance impact. But you could just as well plug in any other functor. In fact, if you chain a map and a filter in Thrill, the two will be joined by the compiler (take element, apply both, proceed to next element). This would not be possible with old-school function pointers.
I'm asking why choose C++ for Thrill if you want essentially non-deterministic automatic memory management and lambdas. Performing e.g. map fusion as you describe is common place for functional language compilers. For example, the vector array library in Haskell has been doing this since 2008.
My hypothesis is that your high-performance implementation could be realised using safer (and I would argue more appropriate) functional languages.
I'd love to see a similar project realised in a functional language, that would be quite exciting!