--- Comment #5 from Philip Hazel <ph10@???> ---
Yes; I'm currently looking at this myself and have just figured out what is
going on. This is actually to do with finding the first character. In the "abc"
case, the loop is using memchr twice, to look for "a" or "A"; because the
latter is never found, there is a long failing search each time. In the other
case, the while loop stops when it hits either of them. The solution, I think,
is to be a bit more clever: search for "a" but if found, limit the search for
"A" to stop before "a". It's a pity there isn't a case-independent memchr(). It
was introduced because in a lot of cases it is faster then a while loop, but
clearly is bad when very long strings are involved. Watch this space - I'm
about to experiment.
You are receiving this mail because:
You are on the CC list for the bug.
This message was posted to the following mailing lists: