Re:No-op statements syntactically valid only since Python X.Y
by mixmastamyk on Monday June 06, 2022 @10:45AM
(#31641148)
Microseconds are not important unless in a very tight loop. Avoid there and/or make a shortcut beforehand.
Python 2.7.15 Linux (logging is 60x slower):
Python 2.7.15 OSX (logging is 71x slower): Python 3.6.8 Linux (logging is 99x slower): And, as usual, Python 3 is 25% slower than Python 2 for the logging case (but 2x faster for the noop if debug case). I hope the recent efforts to increase Python 3 performance are successful.