4 ms·
> On a side note the performance thing seems to be a myth to me. I've always thought about the performance advantages as more related to how (FP) allows for ea
by reallydontask 5y ago
> On a side note the performance thing seems to be a myth to me.
I've always thought about the performance advantages as more related to how (FP) allows for easy parallelisation as your functions are pure, no mutability, etc .
- pharmakom 5y agoYes F# could be faster than C# but the compiler is missing some advanced optimisations. Right now you can do those by hand but often the code will read like C# once you are done.
- verinus 5y agoI wonder if a FP compiler should actuall be able to produce faster code than for imperative style: imho knowing intention and context could lead do far superior optimizations (for loop with var for summing vs. List.sum)
- pharmakom 5y agoYes it definitely can! The most important optimisation (imo) is to replace pure code on immutable data-structures with imperative code on mutable data-structures. Why not just write imperative code? Because it’s really hard to reason about.