marshal doesn't work with "file-like" objects

echuck at mindspring.com echuck at mindspring.com
Mon Jan 29 11:44:08 EST 2001


In article <ku4ryj5zt3.fsf at lasipalatsi.fi>,
  Erno Kuusela <erno-news at erno.iki.fi> wrote:
> In article <950ab5$2h2$1 at nnrp1.deja.com>, echuck at mindspring.com
writes:
>
> | In article <mailman.980557896.25345.python-list at python.org>,
> |   Neil Schemenauer <nas at arctrix.com> wrote:
> || Won't cPickle work?
>
> | Yes, but:
>
> | 1. My benchmarks (which I don't have anymore) showed marshal to be
MUCH
> | faster than cPickle
>
> did you try cPickle's binary mode? it is many times faster than
> the default text mode at least on my machine.
>
>   -- erno


Yes, my benchmark was cPickle vs. marshal. If you look at the extra
benefits that pickle offers over marshal (providing custom hooks,
handling recursive data structures, handling user-defined objects, etc.)
it's clear that marshal pretty much *has* to be faster, provided that
both implementations are high quality.

-Chuck
--
http://webware.sourceforge.net


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list