James Edward Gray II wrote: > On Sep 14, 2007, at 2:20 PM, Simon Kröçer wrote: > >> Ruby Quiz wrote: >>> [...] >>> >>> $ time ruby ip_to_country.rb 68.97.89.187 >>> US >>> >>> real 0m0.314s >>> user 0m0.259s >>> sys 0m0.053s >> >> Is an 'initialisation run' allowed to massage the data? >> (we should at least split the benchmarks to keep it fair) > > My script does need and initialization run, yes. I don't see any harm > in paying a one time penalty to set things up right. > >> Is it motivating or a spoiler to post timings? > > Motivating, definitely. :) > > James Edward Gray II Ok, my script does not need any initialization, it uses the file IpToCountry.csv exactly as downloaded. ---------------------------------------------------------------- $ ruby -v ruby 1.8.4 (2005-12-24) [i386-cygwin] $ time ruby quiz139.rb 68.97.89.187 US real 0m0.047s user 0m0.030s sys 0m0.030s $ time ruby quiz139.rb 84.191.4.10 DE real 0m0.046s user 0m0.046s sys 0m0.015s ---------------------------------------------------------------- This is on a Pentium M 2.13GHz Laptop with 2GB RAM and rather slow HD. cheers Simon