Re: [PATCH] Optimize prefixcmp()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 29, 2007, 22:15 UTC
- Message-ID
- <Pine.LNX.4.64.0712292307210.14355@wbgn129.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <e5bfff550712291239y5648b923y8d332d9c40a8c97b@mail.gmail.com>
Hi,
On Sat, 29 Dec 2007, Marco Costalba wrote:
> What your patch does not seem to avoid is a segfault if prefix or str > are NULL pointers.
I am quite certain that it is not allowed to pass NULL pointers to strcmp, and even if it was, I maintain that it is bad style.
FWIW the test suite seems to agree with me, as it passes with my patch.
However, since you already seem to have a profiling setup ready, I would be interested in some numbers, i.e. if this patch is faster for you or slower, or shows no effect at all.
Ciao, Dscho