Performance of int/long in Python 3
Mark Lawrence
breamoreboy at yahoo.co.uk
Mon Apr 1 17:43:13 EDT 2013
On 01/04/2013 21:28, jmfauth wrote:
> 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.
You've given many examples of the same type of micro benchmark, not many
examples of different types of benchmark.
>
> 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.
Once again you deliberately choose to ignore the memory saving and
correctness to concentrate on the performance slowdown in some cases.
>
> I will happily accept them. The only think I read is "this is faster",
> "it has been tested", ...
>
I do not believe that you will ever accept any facts unless you yourself
provide them.
> jmf
>
--
If you're using GoogleCrap™ please read this
http://wiki.python.org/moin/GoogleGroupsPython.
Mark Lawrence
More information about the Python-list
mailing list