andgineer / TRegExpr

Regular expressions (regex), pascal.
https://regex.sorokin.engineer/en/latest/
MIT License
174 stars 63 forks source link

patch to make faster find "." in unicode mode #197

Closed Alexey-T closed 4 years ago

Alexey-T commented 4 years ago

already in pull-req.

In unicode+ansi mode, function IsCustomLineSeparator is used to detect line break. in unicode mode it was slow. it called Pos(ch, fLineSeparators)! so I removed property LineSeparators into {$IFDEF} UseLineSep. that func now uses fixed set of line break chars, when IFDEF absent. test shows that now it's faster. before/after. 2 pics. see time for tests with dot.

before re-before-opt

after re-after-opt