[issue2144] os.environ should inherit dict
Virgil Dupras
report at bugs.python.org
Wed Feb 20 17:36:40 CET 2008
Virgil Dupras added the comment:
The performance gain is rather good:
hsoft-dev:python hsoft$ ./python.exe -m "timeit" -s "import os"
"os.environ['HOME']"
1000000 loops, best of 3: 1.16 usec per loop
hsoft-dev:python hsoft$ patch -p0 < environ-modern.diff
patching file Lib/os.py
hsoft-dev:python hsoft$ ./python.exe -m "timeit" -s "import os"
"os.environ['HOME']"
1000000 loops, best of 3: 0.428 usec per loop
The regression tests still pass, and modernization of the code is a nice
thing.
+1
----------
nosy: +vdupras
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2144>
__________________________________
More information about the Python-bugs-list
mailing list