28 Jun
2017
28 Jun
'17
12:11 p.m.
I don't want to discourage you, but this is unlikely to produce significant speedups on real-world code. The simple reason is that comparing to None is not a bottleneck for any real application -- comparing to None is probably damn fast compared to everything else the real application does.
That's true. However, I don't think that makes small optimizations worthless. For example, the core devs speed up memory allocation or method calls or whatever by a few percent, and consider it worthwhile, because it all adds up.
That said, it would be nice if you could get stable benchmark results to validate that theory (or not!) ;-)
Yep, I'm more than willing to accept that outcome if that's what the results show! :-) -Ben