Significant performance decreasing after specific regex added to the base
- Dominant language
- C++
- Stars
- 5.5k
- Forks
- 816
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 2
Description
Hi!
I'm using HS 4.5.2 for compiling ~2500 regexps and matching different data buffers.
Adding some more regexps led to noticeable performance decreasing on specific buffer.
Eventually I was able to reproduce this effect with a very small set of 10 regexps: putting the specific pattern (`^.{64}\x00{16}`) led to the dramatic performance fall. My synthetic test shows 0.11 sec for matching 1e6 times for base compiled without this pattern against 7.66 sec for the base compiled with it.
This pattern looks pretty simple so it's very strange to get such kind of depressive effect.
Test's source code and data are available in [my repo](https://github.com/AntonKolobov/hs-issue). Although I can attach it here if necessary.
Contributor guide
Assessment
This issue has not been assessed yet.