[Python-Dev] Micro-optimizations by adding special-case bytecodes? (original) (raw)

Ben Hoyt benhoyt at gmail.com
Wed Jun 28 12:11:18 EDT 2017


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



More information about the Python-Dev mailing list