From: Alex Young Date: 2007-11-16T00:41:29+09:00 Subject: Re: ruby incredibly slow (update 2) Ron Jeffries wrote: > On Thu, 15 Nov 2007 07:24:33 -0500, Alex Young > wrote: > >> He's asking if the last element of this: >> ["localhost", ["test"], 2, "\177\000\000\001"] >> is the same. > > Still don't understand. Same as what? Ah, I see. I believe Eric was originally asking you to enter only this command: ruby -rsocket -e 'p Socket.gethostbyname("127.0.0.1")' which should (and apparently does) print: ["localhost", ["test"], 2, "\177\000\000\001"] to the console. The section "\177\000\000\001" is the binary representation of the IP address that the gethostbyname system call actually used (I think - slightly outside my area), and if it had been different it would have indicated DNS or low-level IP weirdery. I think. >> This is possibly a long shot, but what's in your RUBYOPT environment >> variable? > > it contains: > > -rubygems If you remove it (set RUBYOPT=""), does the time taken to run your counting script improve? I can't think of any reason that it should (barring AV-scanning of opened files), but it might narrow the scope a little. -- Alex