Hacker News new | past | comments | ask | show | jobs | submit login

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.




Most 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.


It'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.


To be frank, I'd have upvoted you too if you'd ended your comment after "ugly".


> 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.


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: