I think that the timing of the scripts are not a good index. It all  
depends on what hardware/os you are running it on.
If we want to use speed as an index we should probably have J.E.  
compare them all on the same machine.

Maybe we could also write a ruby script that runs all the entry  
scripts and time them, and that could be another ruby quiz which will  
also be voted on speed and then we could write a ruby script to time  
those entries an then we could .... Just ignore this paragraph

Diego Scataglini

On Sep 14, 2007, at 3:35 PM, Simon Kröger <SimonKroeger / gmx.de> wrote:

> James Edward Gray II wrote:
>> On Sep 14, 2007, at 2:20 PM, Simon Kröger 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
>