On 04/09/2014 06:54 AM, Norihiro Tanaka wrote: > memchr() of glibc is faster than seeking by delta1 on some platforms. > So, when there is no chance to match for a while, use it on them. > > Speed-up about 3x in best case, 10% in normal case by this patch. > > It's still available only for x86 and x86-64 platform. > Thanks, I have some questions about this one. What benchmark did you use to time this? THe patch refers to a variable called 'trans' that is not in the current savannah git master. Is there some other patch that establishes this variable, a patch that is a prerequisite for this one? If trans is a cached copy of kwset->trans, isn't that guaranteed to be NULL here? What is delta1? It's mentioned in a comment but not in the code. It'd be simpler to use memchr on all platforms; is there a major performance downside to that? For example, what about the attached patch instead? It also simplifies things a bit to avoid a label and its associated gotos, under the assumption that trans is NULL here.