[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

Charles-Francois Natali report at bugs.python.org
Sat Apr 17 20:11:25 CEST 2010


Charles-Francois Natali <neologix at free.fr> added the comment:

Ok, I've done too some trivial benchmarking on my Linux box, and I get this:
right now:
$ time ./python /tmp/test_import.py
real    0m1.258s
user    0m1.111s
sys     0m0.101s

with mmap:
$ time ./python /tmp/test_import.py
real    0m1.262s
user    0m1.170s
sys     0m0.090s

with malloc only:
$ time ./python /tmp/test_import.py
real    0m1.213s
user    0m1.111s
sys     0m0.099s

The test script just imports every module available.
So I'd agree with Antoine, and think we should just use malloc. The attached patch marshal_stack.diff just does that.

----------
Added file: http://bugs.python.org/file16961/marshal_stack.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7332>
_______________________________________


More information about the Python-bugs-list mailing list