Null-checking considerations in F# – it's harder than you think
latkin.org
latkin.org
if x == null then ... else ...
is about the same as: match x with null -> ... | _ -> ...
That said, null checking was never a perf area nor anything I've really had to deal much with in years of working with F#.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.
In practice this is rarely a problem, but the article is highlighting what you need to do when you want to (efficiently) check for these boundary cases.
I've found that every little bit my code gets away from that call without handling the null, things get more and more complicated.
Unless of course that's the right semantics. Often methods use nullable references as a poor man's Option.