From: Robert Klemme Date: 2006-01-02T19:57:56+09:00 Subject: Re: strange speeds kryglik wrote: > Hello ruby people, > I've tried to make some speed test in ruby to find out how fast is > searching in hash (using has_key?) > > The results were OK but I discovered curious thing -- when i generate > big hash the speed is different when i unserialize (marshal.load) the > same hash. > > Unserialized Hash is 1.5x faster in has_key? method. Tried it with > GC.disable as well, results were same. > > What am I missing? > > Thanx for any ideas The first reason that comes to mind is different insertion order. But I hardly believe it could make such a big difference. Care to post your testing code? Kind regards robert