This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] More regex microoptimization


Bonzini wrote:

> 1) add several __builtin_expect predictions.  Most are that
> mb_cur_max == 1, that matching is case sensitive and no translation
> table is used.  This is true for all three of sed, awk and grep
> by default.  Every group of predictions was checked one by one.

The mb_cur_max preference is wrong.  This "optimization" is only good
for profiling the test suite.  In the "real world" UTF-8 is now the
predominent encoding for a locale which means these conditions would be
mispredicted almost all the time and slowing down normal operations.

If you remove those __builtin_expect uses I'll apply the patch.

-- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]