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]

More backreference performance improvements


This patch results in a 40% performance improvement with respect to my
previous more complicated patch (on top of which it should be applied).

Basically I do a limited form of hashing on the backreference cache in order
to check entry->hash only instead of both entry->node and entry->str_idx for
entries not in the cache.  I also cache the first enabled_idx for the last
node/str_idx pair; one could do similar caching on the upper limit of the
for statement too...

Time without the patch for factor.sed 5.1s
With the caching 4.0s
With caching+hashing 2.8s

Now "only" 97% of the time is spent in sift_states_bkref.

Paolo Bonzini

Attachment: regex-more-backref-performance.patch
Description: Binary data


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