[Python-Dev] Python 3.4, marshal dumps slower (version 3 protocol)
tjreedy at udel.edu
Wed Jan 29 05:55:50 CET 2014
On 1/28/2014 10:02 PM, Kristján Valur Jónsson wrote:
>> marshall is not guaranteed to be backward compatible between Python
>> versions, so it's generally not a good idea to use it for serialization.
> How often I hear this argument :)
> For many people, serialized data is not persisted. But used e.g. for sending information over the wire, or between processes.
> Marshal is very good for that. Additionally, it doesn't have any side effects since it just stores primitive types and is thus "safe".
> EVE Online uses its own extended version of the marshal system, and has for years, because it is fast and it can be
> tuned to an application domain by adding custom opcodes.
I think the proper message is this:
"Marshal is designed for caching compiled message objects and has the
function needed for that goal. When the need changes, marshal changes
(with a change in magic number). Other uses should take into account the
limitations of function and stability."
It appears you did just that by making a custom version with the
function and stability you need.
Terry Jan Reedy
More information about the Python-Dev