2 ms·
>>a parallel algorithm may well be in the “worth it to implement” category for Haskell >>“no way that we can make it work” category for some lower level langua
by penteract 5y ago
>>a parallel algorithm may well be in the “worth it to implement” category for Haskell
>>“no way that we can make it work” category for some lower level language.
> I disagree. It is mainly a matter of having libraries available that makes it easy. If a library was made for Haskell that makes parallel algorithms easy to implement a similar library could be made for C++ or whatever to do the same thing.
This does not match my experience. Haskell encourages you to write code in a way that makes parallelism much easier and less likely to bite you (pure functions and immutability everywhere). I've added parallelism to Haskell code that was written without really thinking about parallelism by changing 2 important lines (and trivial changes to a few places in the same file). I can't imagine it being that straightforward if the code had been in C++.