Skip to content

chore: update ahocorasick v0.2.1 → v0.3.0 - #161

Merged
kolkov merged 1 commit into
mainfrom
feature/update-ahocorasick-v0.3.0
Aug 5, 2026
Merged

chore: update ahocorasick v0.2.1 → v0.3.0#161
kolkov merged 1 commit into
mainfrom
feature/update-ahocorasick-v0.3.0

Conversation

@kolkov

@kolkov kolkov commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update github.com/coregx/ahocorasick dependency from v0.2.1 to v0.3.0
  • Adapt 7 call sites to new zero-allocation Find/FindAt API: (Match, bool) instead of *Match
  • Update CHANGELOG.md and ROADMAP.md

Changed files

  • go.mod / go.sum — dependency bump
  • prefilter/ahocorasick.go — 1 call site
  • meta/find.go — 4 call sites (findTeddy, findTeddyAt, findAhoCorasick, findAhoCorasickAt)
  • meta/find_indices.go — 2 call sites (findIndicesAhoCorasick, findIndicesAhoCorasickAt)

Test plan

  • go build ./... — clean
  • go test ./... — all 11 packages pass
  • gofmt -l . — clean (excluding tmp/)
  • CI: tests on 3 OS (ubuntu, macos, windows)
  • CI: benchmark comparison (no regressions expected — API change only, no logic change)

Adapt 7 call sites to new (Match, bool) return signature.
All tests pass, no behavior changes.
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.42857% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
meta/find.go 37.50% 4 Missing and 1 partial ⚠️
meta/find_indices.go 0.00% 4 Missing ⚠️
prefilter/ahocorasick.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Benchmark Comparison

Comparing main → PR #161

Summary: geomean 104.3n 104.5n +0.12%

⚠️ Potential regressions detected:

geomean                    104.3n         104.5n        +0.12%
geomean                               ³                +0.00%               ³
geomean                               ³                +0.00%               ³
geomean              32.48n         32.60n        +0.35%
geomean                         ³                +0.00%               ³
geomean                         ³                +0.00%               ³
AhoCorasickVsStdlib/stdlib_MatchString-4                192.9µ ± ∞ ¹    207.8µ ± ∞ ¹    +7.76% (p=0.008 n=5)
AhoCorasickVsStdlib/stdlib_Find-4                       196.0µ ± ∞ ¹    207.3µ ± ∞ ¹    +5.79% (p=0.008 n=5)
AhoCorasickManyPatterns/stdlib_10_patterns-4            186.3n ± ∞ ¹    244.9n ± ∞ ¹   +31.45% (p=0.008 n=5)
AhoCorasickManyPatterns/stdlib_25_patterns-4            144.7n ± ∞ ¹    191.5n ± ∞ ¹   +32.34% (p=0.008 n=5)

Full results available in workflow artifacts. CI runners have ~10-20% variance.
For accurate benchmarks, run locally: ./scripts/bench.sh --compare

@kolkov
kolkov merged commit f475b7f into main Aug 5, 2026
8 of 9 checks passed
@kolkov kolkov mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant