PCRE2Project / pcre2

PCRE2 development is now based here.
Other
917 stars 191 forks source link

Add property data to classbits #506

Closed zherczeg closed 1 month ago

zherczeg commented 1 month ago

Another perf optimization, the properties are added to the class bits. Currently, it keeps the rule that if a class has no explicit < 256 characters, there is no bitset.

/[a-c\pN]++/utf
  a345bc345ba22c

Old compile time   2.9976 microseconds
New compile time   4.2943 microseconds
Old match time     0.3723 microseconds
New match time     0.2841 microseconds

As expected, the compile time is lower, but the matching time is better for c < 256 characters.