You are viewing a single comment's thread from:
RE: Python Tricks #7 - True and False are slow
Interesting.
I've just tried it out on Python 3.7.3. Most of the time test_1 is coming in at around 3.9xx and test_true is around 4.0xx with about a tenth of a second difference. A few times though, the timings flipped round and test_true was marginally faster.
When it's not almost 11pm I might have a fiddle and see if I can run them side by side and produce better results.
Thanks for the comment! :)
Posted using Partiko Android