From: Robert Klemme Date: 2006-01-03T22:03:28+09:00 Subject: Re: strange speeds kryglik wrote: > Hello > thanx for nice script! > > I find out that i got a little error :o) [see the 'for' cycle in > benchmark part: > for slovo1 in h_slovo > h.has_key? h_slovo (SHOULD NOT BE h_slovo BUT slovo1) > end > > so when I run your script i got confused about speeds like 1-3s > instead of my 60s. The difference between marshaled and generated was > like 35s and 60s (10000 keys in 100.000 hash). In this case it's probably due to hash calculation for the hash you accidentally used as key. > Still the mysteria continues -- why the different speeds. Yeah, I guess we would have to dive into the sources to find out... > And also thanx for lecture of ruby optimization - not quite a guru > (yet :-D). Take your time. :-) > Benchmark is a nice module :) It really is! Kind regards robert