On Sat, Jul 18, 2009 at 9:52 PM, Joel VanderWerf <vjoel / path.berkeley.edu> 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' {} \; .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' {} \; 19.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 > > -- > ¨Βκοεμ Κοεμ ΦαξδεςΧεςζ πατθ βεςλεμεω εδµ±¶¶³΄°· > > -- If you tell the truth you don't have to remember anything. -- Samuel Clemens (some call him Mark Twain)