F# Performance vs C# and Garbage Collector - 2x slower

Thank you for the PR and the time you spent on this!!
I moved back to records because, as tested later, there are no significant performance differences in this particular application.

The real problem was F# string Slicing! As you said C# string[x…] is very very different from F# string.[x…]

So here the end results

Now F# is faster then C#!!!

I just wonder why string splitting behave so differently, and why F# version is so inefficient when just a Substring can fix it, probably for other types of application it is worth it.

Thank you again for your time.
I had fun doing this and I learned a lot!

2 Likes