On 08/16/2010 03:42, Dimitry Andric wrote: > On 2010-08-15 21:49, Dimitry Andric wrote: >> ...I >> have attached a more complete patch that: >> >> - Replaces the horrendously inefficient grep_fgetln() with mostly the >> same implementation as the libc fgetln() function. >> - Uses plain file descriptors instead of struct FILE, since the >> buffering is done manually anyway, and it makes it easier to support >> gzip and bzip2. >> - Let the bzip2 reader just read the file as plain data, when the >> initial magic number doesn't match, mimicking the behaviour of GNU >> grep. > > Here is a new patch, updated against Gabor's changes in r211364. Huge improvement! r211364: With your patch: ./grep-time-trial GNU grep Elapsed time: 2 seconds BSD grep BSD grep Elapsed time: 33 seconds Elapsed time: 16 seconds ./grep-time-trial-2 GNU grep Elapsed time: 3 seconds BSD grep BSD grep Elapsed time: 18 seconds Elapsed time: 11 seconds -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo PicassoReceived on Tue Aug 17 2010 - 03:15:36 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC