locked
F# vs C# in Performance RRS feed

  • Question

  • User1045051390 posted

    Hi, I'm C# Developer and new to F#. I have many questions about F#.

    1- F# have the future?

    2- in Enterprise web development, Can I count on F#?

    3- generally Which one performs better than the other C# or F#?

    Friday, March 20, 2020 10:51 AM

Answers

  • User281315223 posted

    1- F# have the future?

    It's one of the more recent (if not most recent) actual language that was introduced under the .NET Umbrella, and if you've spoken to any of those that actually use it on a day-to-day basic, it's very well loved. Microsoft has seemed to commit to it and outside of C#, it probably gets the most attention of all of the languages for Microsoft-related development, and the go-to language if you want to do functional work in .NET.

    2- in Enterprise web development, Can I count on F#?

    I don't see F# going anywhere anytime soon. It's been very-well loved since it's introduction and has been around long enough to be considered mature. There are tons of large companies actively using it (Dell, Microsoft, Pluralsight, Quicken Loans, Walmart, Jet, etc.) and I'm sure countless others that simply haven't evangelized their usage. Not to mention, I highly expect this trend to continue since it has ranked very highly (if not the highest) globally paid language in the world according to the annual Stack Overflow survey.

    3- generally Which one performs better than the other C# or F#?

    It's a bit hard to generalize something like this - it's easy to write bad or inefficient code in either language, likewise it's possible to write high-performance code using either. I'd say in general, the difference since they run against the same core runtime is probably pretty similar.

    You can see a few examples and benchmarks here comparing C# and F# and you'll notice that for some operations C# outperforms F# and vice versa, it just depends on the operations involved.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 21, 2020 7:03 PM

All replies

  • User281315223 posted

    1- F# have the future?

    It's one of the more recent (if not most recent) actual language that was introduced under the .NET Umbrella, and if you've spoken to any of those that actually use it on a day-to-day basic, it's very well loved. Microsoft has seemed to commit to it and outside of C#, it probably gets the most attention of all of the languages for Microsoft-related development, and the go-to language if you want to do functional work in .NET.

    2- in Enterprise web development, Can I count on F#?

    I don't see F# going anywhere anytime soon. It's been very-well loved since it's introduction and has been around long enough to be considered mature. There are tons of large companies actively using it (Dell, Microsoft, Pluralsight, Quicken Loans, Walmart, Jet, etc.) and I'm sure countless others that simply haven't evangelized their usage. Not to mention, I highly expect this trend to continue since it has ranked very highly (if not the highest) globally paid language in the world according to the annual Stack Overflow survey.

    3- generally Which one performs better than the other C# or F#?

    It's a bit hard to generalize something like this - it's easy to write bad or inefficient code in either language, likewise it's possible to write high-performance code using either. I'd say in general, the difference since they run against the same core runtime is probably pretty similar.

    You can see a few examples and benchmarks here comparing C# and F# and you'll notice that for some operations C# outperforms F# and vice versa, it just depends on the operations involved.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 21, 2020 7:03 PM
  • User1045051390 posted

    helpful information. But even in this forum, there is no branch for this language and the official website is poor. But I think I'll keep learning. thank you very much.

    Saturday, March 21, 2020 8:34 PM
  • User281315223 posted

    Yeah, unfortunately many of the topics on this site haven't evolved very well with the times. I know that the Microsoft Docs site has a section on F# that should be a decent introduction, however anything beyond that, you may want to consider exploring other sites (e.g. proper courses via things like Udemy, Pluralsight, etc. as well as other blog posts, tutorials, and the countless other content out there).

    Thursday, April 2, 2020 4:43 AM