Takeaways:
- indexOf & includes are a lot faster than regexes for this test set
- aho-corasick implementation ( https://github.com/BrunoRB/ahocorasick ) could be optimized, but the baseline performance is very slow, relative to primitives
✓ shared/secretScanning/scan.bench.ts 18972ms
name hz min max mean p75 p99 p995 p999 rme samples
· regex match 6,506,410.47 0.0000 0.9696 0.0002 0.0002 0.0002 0.0002 0.0004 ±0.36% 6506411
· regex test 7,752,708.05 0.0000 0.0453 0.0001 0.0001 0.0002 0.0002 0.0002 ±0.03% 7752709