3 ms·
The "crazy generic path" is still the default, but in F# 4.0 now there is a module `NonStructuralComparison` which can be opened, shadowing all of the generic o
by latkin 11y ago
The "crazy generic path" is still the default, but in F# 4.0 now there is a module `NonStructuralComparison` which can be opened, shadowing all of the generic operators with fast non-generic guys. See [this](http://blogs.msdn.com/b/dotnet/archive/2015/04/29/rounding-out-visual-f-4-0-in-vs-2015-rc.aspx http://blogs.msdn.com/b/dotnet/archive/2015/04/29/rounding-o...) blog, search for "non-structural comparison operators".
- MichaelGG 11y agoWhen I get to a PC I'll try it out. But basically instead of using IComparable directly (so you'd just have a single function call), it used to do something far more complicated first, but still end up calling the same compare function. For equality I'd expect it to inline a check for null before calling the full equality check. Then a later optimization pass or the JIT could fix it up to be just the null check.