[issue19219] speed up marshal.loads()

Antoine Pitrou report at bugs.python.org
Fri Oct 11 11:56:07 CEST 2013


Antoine Pitrou added the comment:

> > Reading the code, I see we now maintain a small internal buffer in
> > the file object, rather than using stack allocation at the call
> > sites.  It is unclear to me how this saves memory, since the amount
> > of memory copying should be the same.
> 
> No, memory copying is suppressed in many cases.

To clarify: the import logic uses marshal.loads(), not marshal.load().
So the aim is really to speed up unmarshalling from memory.

----------

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


More information about the Python-bugs-list mailing list