Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 2010 21:27:44 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        alc@freebsd.org, Dimitry Andric <dimitry@andric.com>, current@freebsd.org
Subject:   Re: Official request: Please make GNU grep the default
Message-ID:  <8639u9f5jj.fsf@ds4.des.no>
In-Reply-To: <4C6D5302.4030602@cs.rice.edu> (Alan Cox's message of "Thu, 19 Aug 2010 10:51:30 -0500")
References:  <4C6505A4.9060203@FreeBSD.org> <20100813085235.GA16268@freebsd.org> <4C66C010.3040308@FreeBSD.org> <4C673F02.8000805@FreeBSD.org> <20100815013438.GA8958@troutmask.apl.washington.edu> <4C67492C.5020206@FreeBSD.org> <B7A05068-9578-4341-851B-86BD9BC7A2DA@gmail.com> <8639ufd78w.fsf@ds4.des.no> <4C6844D8.5070602@andric.com> <86sk2faqdl.fsf@ds4.des.no> <4C6AAA88.5080606@andric.com> <AANLkTik-ee6iKiOoA=KMmmToS2giUOmW5JB-d1vBx9r3@mail.gmail.com> <4C6AF13A.1080606@andric.com> <AANLkTikCyVVmx3-f4g2x1a%2Bq6PYOCLA-KrF53NFTx7uQ@mail.gmail.com> <4C6D3BBB.7030104@andric.com> <4C6D5302.4030602@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Alan Cox <alc@cs.rice.edu> writes:
> Here is what actually puzzles me about these results.  With
> traditional I/O, even after the optimizations to bsdgrep, the system
> time for gnugrep is still less than half that of the optimized
> bsdgrep.  I haven't looked at the changes, but I would have thought
> the system time for gnugrep and bsdgrep would be almost the same.

Two reasons:

1) BSD grep does tons of unnecessary memory-to-memory copy operations in
   grep_fgetln().

2) GNU grep has its own highly optimized regex code.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8639u9f5jj.fsf>