You are viewing a single comment's thread from:

RE: Python Tricks #7 - True and False are slow

in #programming5 years ago

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.

Sort:  

Thanks for the comment! :)

Posted using Partiko Android

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 61547.52
ETH 2377.14
USDT 1.00
SBD 2.58