Performance of int/long in Python 3

Terry Jan Reedy tjreedy at udel.edu
Tue Apr 2 17:33:54 EDT 2013


On 4/2/2013 11:12 AM, jmfauth wrote:
> On 2 avr, 16:03, Steven D'Aprano <steve
> +comp.lang.pyt... at pearwood.info> wrote:

>> I'm sure you didn't intend to be insulting, but some of us *have* taken
>> JMF seriously, at least at first. His repeated overblown claims of how
>> Python is destroying Unicode ...

... = 'usability in Python" or some variation on that.

> Sorrry I never claimed this, I'm just seeing on how Python is becoming
> less Unicode friendly.

Let us see what Jim has claimed, starting in 2012 August.

http://mail.python.org/pipermail/python-list/2012-August/628826.html
"Devs are developing sophisticed tools based on a non working basis."

http://mail.python.org/pipermail/python-list/2012-August/629514.html
"This "Flexible String Representation" fails."

http://mail.python.org/pipermail/python-list/2012-August/629554.html
"This flexible representation is working absurdly."

Reader can decide whether 'non-working', 'fails', 'working absurdly' are 
closer to 'destroying Unicode usability or just 'less friendly'.

On speed:

http://mail.python.org/pipermail/python-list/2012-August/628781.html
"Python 3.3 is "slower" than Python 3.2."

http://mail.python.org/pipermail/python-list/2012-August/628762.html
"I can open IDLE with Py 3.2 ou Py 3.3 and compare strings 
manipulations. Py 3.3 is always slower. Period."

False. Period. Here is my followup at the time.
python.org/pipermail/python-list/2012-August/628779.html
"You have not tried enough tests ;-).

On my Win7-64 system:
from timeit import timeit

print(timeit(" 'a'*10000 "))
3.3.0b2: .5
3.2.3: .8

print(timeit("c in a", "c  = '…'; a = 'a'*10000"))
3.3: .05 (independent of len(a)!)
3.2: 5.8  100 times slower! Increase len(a) and the ratio can be made as
high as one wants!

print(timeit("a.encode()", "a = 'a'*1000"))
3.2: 1.5
3.3:  .26"

If one runs stringbency.ph with its 40 or so tests, 3.2 is sometimes 
faster and 3.3 is sometimes faster.

http://mail.python.org/pipermail/python-list/2012-September/630736.html

On to September:

"http://mail.python.org/pipermail/python-list/2012-September/630736.html"
"Avoid Py3.3"

In other words, ignore all the benefits and reject because a couple of 
selected microbenchmarks show a slowdown.

http://mail.python.org/pipermail/python-list/2012-September/631730.html
"Py 3.3 succeeded to somehow kill unicode"

I will stop here and let Jim explain how 'kill unicode' is different 
from 'destroy unicode'.

--
Terry Jan Reedy





More information about the Python-list mailing list