[issue3119] pickle.py is limited by python's call stack
report at bugs.python.org
Sun Jul 13 22:26:26 CEST 2008
Alexandre Vassalotti <alexandre at peadrop.com> added the comment:
On some benchmark of my own, I get a good 2x slowdown when this patch is
applied. The benchmark consists of loading ~1.4 millions objects (mostly
dict, list, str and int) from a pickle string. It is basically a torture
test for the inner function calls overhead.
Anyway, the slowdown doesn't bother me much. I think a "stackless"
pickle module would be well appreciated by many Python users.
There is a few things that stops me from applying this patch. First, the
patch will break subclasses of Pickler that relies on the save() method
(Although the method is an implementation detail that shouldn't used).
Therefore, any patches that modifies the API of save() is straight out
for 2.x. And for Python 3.0, your patch should also remove recursion
from the _pickle module (the transparent C accelerator for pickle).
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list