From: "Matthias Wächter" Date: 2007-09-18T18:00:37+09:00 Subject: Re: [QUIZ] IP to Country (#139) I just performed the tests another time on my desktop computer with a freshly installed Sabayon Linux. I don't know why this one performs that much better -- it's gentoo-based, it's the same file system, but it has no SCSI controller - maybe that makes it faster? Or is it the dual-core ... anyway. It's about twice as fast and requires a fraction of the "sys" times. Also the "empty" ruby run is only 5 ms. Mysteriously. The packer is down at 0.8s, and 100000 lookups are at 6.2 s (file-based aka memory efficient) and 3.7 s (everything in-memory). Anyway -- i'd like to see a 100000 lookups comparison :) *hehe* Matthias W�chter schrieb: > My results for 100000 lookups are: > > $ time ./packer.rb > > real 0m1.634s > user 0m1.576s > sys 0m0.056s $ time ./packer.rb real 0m0.716s user 0m0.708s sys 0m0.008s > $ time ./rand_ip.rb 100000 byline > ip-test-list > > real 0m0.797s > user 0m0.740s > sys 0m0.056s $ time ./rand_ip.rb 100000 byline > ip-test-list real 0m0.322s user 0m0.317s sys 0m0.005s > $ time ./search_file.rb < ip-test-list > /dev/null > > real 0m11.091s > user 0m9.673s > sys 0m1.420s $ time ./search_file.rb /dev/null real 0m6.201s user 0m5.316s sys 0m0.885s > $ time ./search_str.rb < ip-test-list > /dev/null > > real 0m7.131s > user 0m6.960s > sys 0m0.168s $ time ./search_str.rb /dev/null real 0m3.714s user 0m3.707s sys 0m0.006s > btw: I don't understand the following result -- can you help me improving this? 129 ms just for firing ruby up! Can't be! > $ time ruby /dev/null > > real 0m0.129s > user 0m0.120s > sys 0m0.012s $ time ruby /dev/null real 0m0.005s user 0m0.004s sys 0m0.001s > $ uname -a > Linux server 2.6.21-modgentoo #2 SMP Wed May 2 19:07:13 CEST 2007 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux $ uname -a Linux sabayon2me 2.6.22-sabayon #1 SMP Mon Sep 3 00:33:06 UTC 2007 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux > $ ruby --version > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] $ ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] - Matthias