Performance of int/long in Python 3

jmfauth wxjmfauth at gmail.com
Mon Apr 1 16:28:10 EDT 2013


On 1 avr, 21:28, Chris Angelico <ros... at gmail.com> wrote:
> On Tue, Apr 2, 2013 at 6:15 AM, jmfauth <wxjmfa... at gmail.com> wrote:
> > Py32
> >>>> import timeit
> >>>> timeit.repeat("'a' * 1000 + 'ẞ'")
> > [0.7005365263669056, 0.6810694766790423, 0.6811978680727229]
> >>>> timeit.repeat("'a' * 1000 + 'z'")
> > [0.7105829560031083, 0.6904999426964764, 0.6938637184431968]
>
> > Py33
> > import timeit
> > timeit.repeat("'a' * 1000 + 'ẞ'")
> > [1.1484035160337613, 1.1233738895227505, 1.1215708962703874]
> > timeit.repeat("'a' * 1000 + 'z'")
> > [0.6640958193635527, 0.6469043692851528, 0.6458961423900007]
>
> This is what's called a microbenchmark. Can you show me any instance
> in production code where an operation like this is done repeatedly, in
> a time-critical place? It's a contrived example, and it's usually
> possible to find regressions in any system if you fiddle enough with
> the example. Do you have, for instance, a web server that can handle
> 1000 tps on 3.2 and only 600 tps on 3.3, all other things being equal?
>
> ChrisA

-----

Of course this is an example, as many I gave. Examples you may find in
apps.

Can you point and give at least a bunch of examples, showing
there is no regression, at least to contradict me. The only
one I succeed to see (in month), is the one given by Steven, a status
quo.

I will happily accept them. The only think I read is "this is faster",
"it has been tested", ...

jmf




More information about the Python-list mailing list