I’ve recently inspected the performance of a F# app and while digging through the CIL I’ve found out that FSharp.Core (for .NET v4.0) contains several nop instructions, many unused variables and variables which are only written/read once via sequences of stloc/ldloc instructions.
I’ve investigated the possible causes and I’ve noticed that even in release mode F# assemblies include the –debug:pdbonly directive and there’s no way to disable this and switch to –debug- from the project settings UI.
I’m wondering if there was a specific choice for the compilation settings of FSharp.Core and if so what was that. Otherwise is it legitimate to expect a fully optimized version of the runtime?
I’ve recently inspected the performance of a F# app and while digging through the
Share
It seems like the comments on the question have already answered about 90% of this; to reiterate them:
There are, of course, all kinds of ways the F# compiler could be potentially emitting better code (this is probably true of every compiler); if you profile your app and notice something bad (e.g. a big discrepancy versus comparable code from C#) then you can let the F# team know by mailing fsbugs. But measure first.