[issue20416] Marshal: special case int and float, don't use references
Serhiy Storchaka
report at bugs.python.org
Fri Jan 30 20:43:35 CET 2015
Serhiy Storchaka added the comment:
Here are results of the benchmark which measures dump and load time for all pyc files in the stdlib (including tests).
https://bitbucket.org/storchaka/cpython-stuff/src/default/marshal/marshalbench.py
$ find * -name __pycache__ -exec rm -rf '{}' +
$ ./python -m compileall -qq -r 99 Lib
$ find Lib -name '*.pyc' | xargs ./python marshalbench.py
Without the patch:
ver. dumps loads size
770.3 19941.2
0 695.7 1178.4 19941.2
1 680.4 1180.9 19941.2
2 635.9 1115.9 19941.2
3 896.3 757.3 19941.2
4 748.0 700.6 19941.2
With marshal3_numbers.patch:
ver. dumps loads size
750.5 19946.1
0 690.2 1173.7 19946.1
1 678.2 1166.6 19946.1
2 630.9 1105.2 19946.1
3 873.2 751.5 19946.1
4 724.6 687.6 19946.1
With marshal_refs_by_value.patch:
ver. dumps loads size
780.2 19935.8
0 712.7 1202.6 19935.8
1 713.8 1195.1 19935.8
2 676.5 1126.0 19935.8
3 686.1 762.7 19935.8
4 515.1 697.6 19935.8
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20416>
_______________________________________
More information about the Python-bugs-list
mailing list