From: "Bermejo, Rodrigo" Date: 2003-08-26T23:04:33+09:00 Subject: Re: Ruby launching system apps? > > >> >> >> I agree with Gennady that you will frequently be better off using >> native Ruby classes and methods for many things, particularly >> in-memory string manipulation, even if comparable tools are available >> through a Unix command. >> >> Regards, >> >> Mark >> > on ruby 1.6.8 > > time ruby -p -e 'gsub("sed","ruby")' file_with_1000000_sed_lines > 7.61s user 2.02s system 35% cpu 27.161 total > > time sed s/sed/ruby/g file_with_1000000_sed_lines > 2.05s user 1.71s system 32% cpu 11.571 total > > ...I expected other results...but (I hope) it's improved on 1.8 ( > I could not test it now on 1.8 ) > > -r. > > > > > >