Re: String concatenation benchmarking weirdness

2013-01-12 Thread Ian Kelly
On Sat, Jan 12, 2013 at 1:38 AM, wrote: > The difference between a correct (coherent) unicode handling and ... This thread was about byte string concatenation, not unicode, so your rant is not even on-topic here. -- http://mail.python.org/mailman/listinfo/python-list

Re: stringbench (was Re: String concatenation benchmarking weirdness)

2013-01-12 Thread Chris Angelico
On Sun, Jan 13, 2013 at 1:27 AM, Terry Reedy wrote: > On 1/12/2013 6:42 AM, Chris Angelico wrote: >> >> On Sat, Jan 12, 2013 at 10:31 PM, Terry Reedy wrote: >>> >>> 0.410.4395.2("WHERE IN THE WORLD IS CARMEN SAN >>> DEIGO?"*10).lower() >> >> >> Why does stringbench misspell the name C

Re: stringbench (was Re: String concatenation benchmarking weirdness)

2013-01-12 Thread Terry Reedy
On 1/12/2013 6:42 AM, Chris Angelico wrote: On Sat, Jan 12, 2013 at 10:31 PM, Terry Reedy wrote: 0.410.4395.2("WHERE IN THE WORLD IS CARMEN SAN DEIGO?"*10).lower() Why does stringbench misspell the name Carmen Sandiego? Copyright avoidance? Or ignorance. Perhaps I will fix it so

stringbench (was Re: String concatenation benchmarking weirdness)

2013-01-12 Thread Chris Angelico
On Sat, Jan 12, 2013 at 10:31 PM, Terry Reedy wrote: > 0.410.4395.2("WHERE IN THE WORLD IS CARMEN SAN > DEIGO?"*10).lower() Why does stringbench misspell the name Carmen Sandiego? Copyright avoidance? ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: String concatenation benchmarking weirdness

2013-01-12 Thread Terry Reedy
On 1/12/2013 3:38 AM, wxjmfa...@gmail.com wrote: from timeit import timeit, repeat size = 1000 r = repeat("y = x + 'a'", setup = "x = 'a' * %i" % size) print('1:', r) r = repeat("y = x + 'é'", setup = "x = 'a' * %i" % size) print('2:', r) r = repeat("y = x + 'œ'", setup = "x = 'a' * %i" % size)

Re: String concatenation benchmarking weirdness

2013-01-12 Thread wxjmfauth
from timeit import timeit, repeat size = 1000 r = repeat("y = x + 'a'", setup = "x = 'a' * %i" % size) print('1:', r) r = repeat("y = x + 'é'", setup = "x = 'a' * %i" % size) print('2:', r) r = repeat("y = x + 'œ'", setup = "x = 'a' * %i" % size) print('3:', r) r = repeat("y = x + '€'", setup = "

Re: String concatenation benchmarking weirdness

2013-01-11 Thread Rotwang
On 11/01/2013 20:16, Ian Kelly wrote: On Fri, Jan 11, 2013 at 12:03 PM, Rotwang wrote: Hi all, the other day I 2to3'ed some code and found it ran much slower in 3.3.0 than 2.7.2. I fixed the problem but in the process of trying to diagnose it I've stumbled upon something weird that I hope some

Re: String concatenation benchmarking weirdness

2013-01-11 Thread Ian Kelly
On Fri, Jan 11, 2013 at 12:03 PM, Rotwang wrote: > Hi all, > > the other day I 2to3'ed some code and found it ran much slower in 3.3.0 than > 2.7.2. I fixed the problem but in the process of trying to diagnose it I've > stumbled upon something weird that I hope someone here can explain to me. In >

String concatenation benchmarking weirdness

2013-01-11 Thread Rotwang
Hi all, the other day I 2to3'ed some code and found it ran much slower in 3.3.0 than 2.7.2. I fixed the problem but in the process of trying to diagnose it I've stumbled upon something weird that I hope someone here can explain to me. In what follows I'm using Python 2.7.2 on 64-bit Windows 7