Message263727
timeit microbenchmarks on dict_version-8.patch, minimum of 10 runs.
$ ./python.orig -m timeit 'd={1: 0}; d[2]=0; d[3]=0; d[4]=0; del d[1]; del d[2]; d.clear()'
1000000 loops, best of 3: 0.292 usec per loop
$ ./python.version -m timeit 'd={1: 0}; d[2]=0; d[3]=0; d[4]=0; del d[1]; del d[2]; d.clear()'
1000000 loops, best of 3: 0.293 usec per loop
=> 1 nanosecond (0.3%) slower
$ ./python.orig -m timeit 'd={i:i for i in range(2**16)}' 'for i in range(2**16): d[i]=i-1' 'for i in range(2**16): d[i]=i+1' 'for i in range(2**15): del d[i]' 'd.clear()'
10 loops, best of 3: 21.2 msec per loop
$ ./python.version -m timeit 'd={i:i for i in range(2**16)}' 'for i in range(2**16): d[i]=i-1' 'for i in range(2**16): d[i]=i+1' 'for i in range(2**15): del d[i]' 'd.clear()'
10 loops, best of 3: 21.3 msec per loop
=> 0.1 ms (0.5%) slower |
|
Date |
User |
Action |
Args |
2016-04-19 10:38:56 | vstinner | set | recipients:
+ vstinner, brett.cannon, pitrou, r.david.murray, yselivanov |
2016-04-19 10:38:56 | vstinner | set | messageid: <1461062336.26.0.364679429804.issue26058@psf.upfronthosting.co.za> |
2016-04-19 10:38:56 | vstinner | link | issue26058 messages |
2016-04-19 10:38:56 | vstinner | create | |
|