From: Robert Dober Date: 2009-09-13T20:25:55+09:00 Subject: Re: ruby in 50 milliseconds or less On Sat, Jul 18, 2009 at 9:52 PM, Joel VanderWerf wrote: > > Here's an extreme example where this makes a huge difference: > > I have a dir tree with large numbers of small gps log files, in CSV format, > and I want to use ruby -a (autosplit) to work with them. > > With RUBYOPT=rgem-fallback (or of course RUBYOPT=''): > > $ time find . -type f -exec ruby -F, -ane '$F' {} \; > RUBYOPT='' find . -type f -exec ruby -F, -ane '$F' {} \;  2.06s user 1.67s > system 39% cpu 9.431 total > > With RUBYOPT=rubygems: > > $ time find . -type f -exec ruby -F, -ane '$F' {} \; > find . -type f -exec ruby -F, -ane '$F' {} \;  219.02s user 61.52s system > 93% cpu 4:59.26 total > > Of course, awk would probably be even faster, but ... ... that would mean using the right tool for the right task ;) Sorry couldn't resist. This however does not mean that your contribution is not very valuable, because Ruby will be the right tool often enough and even here, maybe you have a team where everybody knows Ruby but few know awk.... Cheers Robert > > -- >      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > > -- If you tell the truth you don't have to remember anything. -- Samuel Clemens (some call him Mark Twain)