2 ms·
Generally they won't auto-parallelise, because the tradeoff between inter-thread communication time and performance as well as thread lifetime tends to need man
by pjc50 6y ago
Generally they won't auto-parallelise, because the tradeoff between inter-thread communication time and performance as well as thread lifetime tends to need manual control.
Both functional and imperative languages can auto-vectorise, although in a functional language it's a lot easier to check that the map is side-effect-free! If your "upper" function is allowed to mutate other list elements then suddenly order of execution matters.
C#'s functional-flavoured sublanguage of LINQ has an auto-paralleliser: https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/introduction-to-plinq https://docs.microsoft.com/en-us/dotnet/standard/parallel-pr...
(I absolutely love writing functional-style code in a fairly-strongly-typed imperative language, because you can usually get all the benefits of functional when you need them and not trip over yourself when you need to actually do IO or interface with the system)