You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compile: use SparseSet-like structure for SuffixCache
For simple regexes, allocating and filling 1000 of SuffixCache elements
seemed to be quite high on the profile as part of Compiler::new, so I
decided to optimise it by using ideas similar to sparse set, but specialised
for a hashmap-like structure, instead of a flat array with versioning.
In my performance comparisons this gives 8-10% improvement for simple
regexes where overhead of Compiler::new is most noticeable.
0 commit comments