Message259625
I'll put together something comprehensive in a bit, but here's a quick preview:
$ ./python
Python 3.6.0a0 (default, Feb 4 2016, 20:08:03)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
Total BINARY_SUBSCR calls: 726
List BINARY_SUBSCR calls: 36
Tuple BINARY_SUBSCR calls: 103
Dict BINARY_SUBSCR calls: 227
Unicode BINARY_SUBSCR calls: 288
Bytes BINARY_SUBSCR calls: 68
[-1] BINARY_SUBSCR calls: 0
$ python bm_elementtree.py -n 100 --timer perf_counter
...[snip]...
Total BINARY_SUBSCR calls: 1078533
List BINARY_SUBSCR calls: 513
Tuple BINARY_SUBSCR calls: 1322
Dict BINARY_SUBSCR calls: 1063075
Unicode BINARY_SUBSCR calls: 13150
Bytes BINARY_SUBSCR calls: 248
[-1] BINARY_SUBSCR calls: 0
Lib/test$ ../../python -m unittest discover
...[snip]...^C <== I got bored waiting
KeyboardInterrupt
Total BINARY_SUBSCR calls: 4732885
List BINARY_SUBSCR calls: 1418730
Tuple BINARY_SUBSCR calls: 1300717
Dict BINARY_SUBSCR calls: 1151766
Unicode BINARY_SUBSCR calls: 409924
Bytes BINARY_SUBSCR calls: 363029
[-1] BINARY_SUBSCR calls: 26623
So dict seems to be the winner here |
|
Date |
User |
Action |
Args |
2016-02-05 03:46:19 | zbyrne | set | recipients:
+ zbyrne, pitrou, vstinner, serhiy.storchaka, yselivanov |
2016-02-05 03:46:19 | zbyrne | set | messageid: <1454643979.89.0.231361462956.issue26280@psf.upfronthosting.co.za> |
2016-02-05 03:46:19 | zbyrne | link | issue26280 messages |
2016-02-05 03:46:19 | zbyrne | create | |
|