3 ms·
What! Why? (I couldn’t figure it out from your link)
by bilsbie 3y ago
What! Why? (I couldn’t figure it out from your link)
- Retr0id 3y agoThe link seems fairly clear to me - One explanation given is that python3 represents all integers in a "long" type, whereas python2 defaulted to small ints. This gave (gives?) python2 an advantage on tasks involving manipulating lots of small integers. Most real-world python code isn't like this, though. Interestingly they singled out pyaes as one of the worst offenders. I've also written a pure-python AES implementation, one that deliberately takes advantage of the "long" integer representation, and it beats pyaes by about 2000%.