This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients brett.cannon, pitrou, r.david.murray, vstinner, yselivanov
Date 2016-04-19.10:38:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461062336.26.0.364679429804.issue26058@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-04-19 10:38:56vstinnersetrecipients: + vstinner, brett.cannon, pitrou, r.david.murray, yselivanov
2016-04-19 10:38:56vstinnersetmessageid: <1461062336.26.0.364679429804.issue26058@psf.upfronthosting.co.za>
2016-04-19 10:38:56vstinnerlinkissue26058 messages
2016-04-19 10:38:56vstinnercreate