From: Brian Candler Date: 2003-03-19T02:45:34+09:00 Subject: Re: Marshal (was Re: Protocols) On Wed, Mar 19, 2003 at 12:40:56AM +0900, Xiangrong Fang wrote: > Thanks. For the purpose of my current program, I don't need > interoperable serialization. I think ruby's is ok for me, however, I > don'see very good performance in 1.6.7's Marshal, so I continue to use > sysread and split to build my hash in memory. Can you post the code you are testing the timing with? Marshalling (out) is very slow if marshalling to a string; the solution is to marshal directly to an IO object, i.e. Marshal.dump(myobj, $defout) is much faster for large dumps than Marshal to a string and then writing the string. Marshalling in seems to be very fast indeed. Regards, Brian.