From: Bill Kelly Date: 2003-03-19T02:07:23+09:00 Subject: Re: Marshal (was Re: Protocols) Hi Shannon, From: "Xiangrong Fang" > 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. I'm getting pretty good speed in Win32 1.6.6 Ruby using Marshal to decode a string loaded with sysread, ala: def load(filename) dat = File.open(filename, "r") {|f| f.binmode; f.sysread(f.stat.size) } @entries = Marshal.load(dat) end It loads a million-entry hash table (18 meg on disk) in about 15 sec. on my system. (Goes a couple seconds faster if surrounded with GC.disable/GC.enable, as you mentioned in an earlier post.) [A 100000-entry version of the hash table, 1.8 meg on disk, as anticipated, took about 1.5 seconds to load.] Hope this helps, Bill