[Python-Dev] Idea: more compact, interned string key only dict for namespace.
INADA Naoki
songofacandy at gmail.com
Thu Jun 23 03:41:21 EDT 2016
I've checked time and maxrss of sphinx-build.
In case of sphinx,
## master
$ rm -rf build/
$ /usr/bin/time ~/local/python-master/bin/sphinx-build -b html -d
build/doctrees -D latex_paper_size= . build/html -QN
71.76user 0.27system 1:12.06elapsed 99%CPU (0avgtext+0avgdata
176248maxresident)k
80inputs+202888outputs (2major+58234minor)pagefaults 0swaps
71.86user 0.28system 1:12.16elapsed 99%CPU (0avgtext+0avgdata
176312maxresident)k
0inputs+201480outputs (0major+59897minor)pagefaults 0swaps
## compact-dict w/ shared
$ rm -rf build/
$ /usr/bin/time ~/local/python-compact/bin/sphinx-build -b html -d
build/doctrees -D latex_paper_size= . build/html -QN
72.18user 0.27system 1:12.47elapsed 99%CPU (0avgtext+0avgdata
158104maxresident)k
728inputs+200792outputs (0major+53409minor)pagefaults 0swaps
72.79user 0.30system 1:13.11elapsed 99%CPU (0avgtext+0avgdata
157916maxresident)k
0inputs+200792outputs (0major+54072minor)pagefaults 0swaps
## compact w/o shared key
(Only shared key removed. No interned key only dict)
$ rm -rf build/
$ /usr/bin/time ~/local/python-intern/bin/sphinx-build -b html -d
build/doctrees -D latex_paper_size= . build/html -QN
71.79user 0.34system 1:12.16elapsed 99%CPU (0avgtext+0avgdata
165884maxresident)k
480inputs+200792outputs (0major+56947minor)pagefaults 0swaps
71.84user 0.27system 1:12.13elapsed 99%CPU (0avgtext+0avgdata
166888maxresident)k
640inputs+200792outputs (5major+56834minor)pagefaults 0swaps
--
INADA Naoki <songofacandy at gmail.com>
More information about the Python-Dev
mailing list