3 ms·
Yes 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#
by pharmakom 5y ago
Yes 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.