intel / intel/hyperscan

Significant performance decreasing after specific regex added to the base

Open
#68 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.