3 ms·
Someone writing an article in 2022 about Python's speed, and only citing articles from 2020 is not being honest about Python's speed. There were major speed im
by tbsdrj 4y ago
Someone writing an article in 2022 about Python's speed, and only citing articles from 2020 is not being honest about Python's speed. There were major speed improvements in Python 3.8, which was quite new then -- the linked article was not specific about which subversion of Python it was using, so we don't really know what the comparison was. In addition: The article that actually compared the speeds of the languages did a really bad implementation of a speed test in Python. The time library in Python includes a function for performance testing, which wasn't used, so much of the speed difference could well be due to using the wrong resolution clock. Also, if you're doing numerical calculations for speed, you should be using numpy. So, yes, if you tie Python's ankles together, and time it using an analog clock on the wall, it will not post a faster time than an NCAA Division I sprinter at a track meet. Thanks, that's helpful.