4 ms·
This kind of optimization actually drove me away from F#. I realized that high-performance F# is essentially imperative C# with F# syntax. There is no place fo
by sally1620 6y ago
This kind of optimization actually drove me away from F#. I realized that high-performance F# is essentially imperative C# with F# syntax.
There is no place for high order functions and functional constructs in high performance F# code.
- kqr 6y ago> essentially imperative C# with F# syntax This sounds pretty good to me! Not to mention that once you get out of the hot path, the threshold to switch to more readable F# is very low.
- pjmlp 6y agoMost of the time you won't need it, and when there is the need the tools are there. It is no different in most languages, even C++ can look pretty ugly when going for F1 performance.
- skrebbel 6y agoTo be frank, I'd have upvoted you too if you'd ended your comment after "ugly".
- deleted 6y ago[deleted]
- mumblemumble 6y agoIt's true of C# as well. Implementing the full suite of performance tricks precludes object-oriented techniques every bit as much as it precludes functional techniques, because the fastest possible code path is rarely going to wander through a vtable. I suppose, though, that it's always easier to throw a baby out with the bathwater when it's someone else's baby.
- pharmakom 6y agoI kind of agree... although I still think F# is a win over C#. IMO the syntax is much nicer and idiomatic F# is still pretty fast. However, I wish the compiler would more aggressively optimise things so that I can dip into this style less often. I shouldn’t have to write the imperative stuff if the translation is mechanical! The C++ compilers do far more work for the user, despite F# being a language much more conducive to being optimised. It would be great if Microsoft Research could sponsor a project in this area.