F# and C# 's CLR is same then why is F# faster than C#

前端 未结 7 738
失恋的感觉
失恋的感觉 2021-01-18 02:42

I am confused and would appreciate if you enlighten me. F# uses same CLR as C# and underlying code is identical then how can one suggest that a function runs faster when wr

7条回答
  •  野的像风
    2021-01-18 03:07

    The answer isn't the performance in speed or resources BC they are nearly the same. Some debated enhancements and cons... The reason for F# is development and deployment time. F# is more streamlined and eager to build with safer code. Less error prone and more exact without worry about simple things like loop counters and type checking, cross threading etc. Therefore it is not only easier and faster to write but far less buggy. You get more of what you really wanted without worrying about the petty things. This means less testing and more live deployment, more trusted code and more precise functions that don't carry unneeded overhead. Therefore the bottom line result is faster written code, optimized performance by nature, and equally as much trust with less error.

提交回复
热议问题