tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] implementing a faster algorithm for strpbrk(3) in libc

On Tue, Sep 23, 2008 at 06:09:27PM +0200, Alan Barrett wrote:
> This is clever, but it's not obvious that it will be faster than the
> existing code (since it will have more conditional branches), and it's
> even less obvious that it would be faster than something that simply
> changes the existing bit array to a byte array.

The use of the bit array is a compromise between startup overhead
(relevant for short input strings) and the main loop (long input).


Home | Main Index | Thread Index | Old Index