nitely / nim-regex

Pure Nim regex engine. Guarantees linear time matching
https://nitely.github.io/nim-regex/
MIT License
225 stars 20 forks source link

match/find/findAll is much slower on ORC #125

Closed nitely closed 9 months ago

nitely commented 11 months ago

It seems calls to =destroy and =copy are added due to the lookaround operation, even if the lookaround code itself is never ran (not even the outer loop). Commenting out this line makes match +2x faster. Found that with the benchmark + valgrind. Sadly, valgrind does not tell me on what object it's called, but it goes away after removing all var parameters. Also, it does not makes sense why it would copy that (maybe because the lookaround call is recursive?).

nitely commented 11 months ago

Reported upstream https://github.com/nim-lang/Nim/issues/22552

nitely commented 9 months ago

Closing because #129 removes the hot path iterator usage. Although, the perf regression that Nim introduced it's still there.