Skip to content

dependencies: bump github.com/coregx/coregex from 0.12.16 to 0.12.21#133

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/go_modules/github.com/coregx/coregex-0.12.21
Closed

dependencies: bump github.com/coregx/coregex from 0.12.16 to 0.12.21#133
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/go_modules/github.com/coregx/coregex-0.12.21

Conversation

@dependabot
Copy link
Copy Markdown

@dependabot dependabot bot commented on behalf of github Apr 1, 2026

Bumps github.com/coregx/coregex from 0.12.16 to 0.12.21.

Release notes

Sourced from github.com/coregx/coregex's releases.

v0.12.21: Tagged start states, zero-alloc API, 5 patterns faster than Rust

Performance

DFA Engine

  • Tagged start states (Rust LazyStateID) — prefilter skip-ahead only at start state, fast transition in slow path (no getState/acceleration overhead)
  • DFA multiline $ fix — EndLine look-ahead (Rust determinize mod.rs:131-212)
  • Dead-state prefilter restart in searchEarliestMatch
  • Tiny NFA → UseDFA — patterns with <20 NFA states use bidirectional DFA (was PikeVM, 7x faster)

Allocation

  • 1100x fewer mallocs — flat buffer for FindAllIndex/FindAllSubmatchIndex
  • Local SearchState cache — atomic.Pointer, survives GC
  • Pool round-trip elimination in FindAll/Count

New Public API (zero-alloc)

  • AllIndex(b []byte) iter.Seq[[2]int] — zero-alloc iterator (Go proposal #61902)
  • AllStringIndex(s string) iter.Seq[[2]int] — string version
  • All(b []byte) iter.Seq[[]byte] — match content iterator
  • AllString(s string) iter.Seq[string] — string version
  • AppendAllIndex(dst [][2]int, b []byte, n int) [][2]int — buffer-reuse (strconv.Append* pattern)
  • AppendAllStringIndex(dst [][2]int, s string, n int) [][2]int — string version

Benchmarks (EPYC CI, 6MB input)

5 patterns faster than Rust (was 3 in v0.12.20):

Pattern vs stdlib vs Rust
IP address 685x 18.8x faster
Multiline PHP 299x 2.2x faster
Char class 11x 1.3x faster
Inner literal 881x 1.2x faster (NEW)
Version 263x 1.2x faster (NEW)

Zero-Alloc API (new methods vs stdlib-compat)

Method errors (33K matches) Alloc
FindAllStringIndex (stdlib) 8.2ms / 3890 KB 19 mallocs
AllIndex (iter.Seq) 5.9ms / 0 KB 0 mallocs
AppendAllIndex 5.5ms / 0 KB 0 mallocs

emails with AppendAllIndex: 2.0ms vs Rust 2.6ms — faster than Rust!

Fixed

  • DFA multiline $(?m)hello$ now matches before \n
  • isMatchWithPrefilter pfSkip — zx+ on "zzx" now correct

Full Changelog

coregx/coregex@v0.12.20...v0.12.21

... (truncated)

Changelog

Sourced from github.com/coregx/coregex's changelog.

[0.12.21] - 2026-03-27

Performance

  • Tagged start states (Rust LazyStateID approach) — start states get tag bit, always route to slow path. Enables prefilter skip-ahead only at start state, eliminating O(n²) from start state self-loop. Unlocks UseDFA for tiny NFA patterns.

  • DFA multiline $ fix — EndLine look-ahead re-computation in determinize (Rust mod.rs:131-212). (?m)hello$ now works correctly in DFA.

  • Dead-state prefilter restart in searchEarliestMatch — IsMatch path uses prefilter to skip past dead states, matching Rust find_fwd_imp approach.

  • 1100x fewer mallocs — FindAllIndex/FindAllSubmatchIndex use flat buffer (compactToSliceOfSlice): N matches → 2 allocations instead of N+1.

  • Local SearchState cache on Engine — atomic.Pointer single-slot cache survives GC, avoids sync.Pool re-allocation overhead.

  • Tiny NFA → UseDFA routing — patterns with < 20 NFA states now use bidirectional DFA (was PikeVM). 7x faster DFA vs PikeVM on large inputs.

Added

  • AllIndex(b []byte) iter.Seq[[2]int] — zero-alloc match index iterator (Go 1.23+)
  • AllStringIndex(s string) iter.Seq[[2]int] — string version
  • All(b []byte) iter.Seq[[]byte] — zero-alloc match content iterator
  • AllString(s string) iter.Seq[string] — string version
  • AppendAllIndex(dst [][2]int, b []byte, n int) [][2]int — buffer-reuse API
  • AppendAllStringIndex(dst [][2]int, s string, n int) [][2]int — string version

Naming follows Go proposal #61902 (regexp iterator methods) and strconv.Append* convention.

Fixed

  • DFA isMatchWithPrefilter pfSkip off-by-one — zx+ on "zzx" now correct
  • DFA multiline $ EndLine look-ahead — (?m)hello$ now matches before \n

Benchmarks (LangArena LogParser, 7.2 MB, 13 patterns)

Metric v0.12.20 v0.12.21 Improvement
Total time (FindAll) 163ms 107ms -34%
errors pattern 23ms 8ms (FindAll) / 5.5ms (AllIndex) -65% / -76%
vs Rust gap 3.9x 2.9x (FindAll) / 1.7x (AllIndex) -56%
Mallocs/iter 203K 182 -99.9%

Zero-Alloc API Benchmarks (new methods vs stdlib-compat)

Method errors (33K matches) Alloc vs Rust
FindAllStringIndex (stdlib) 8.2ms / 3890 KB 19 mallocs 2.6x slower

... (truncated)

Commits
  • 87d600b Merge pull request #155 from coregx/release/v0.12.21
  • e147568 perf: v0.12.21 — tagged start states, zero-alloc API, -34% LangArena
  • 90d77fd Merge pull request #154 from coregx/release/v0.12.20
  • d22c05c perf: v0.12.20 — premultiplied StateIDs, break-at-match, Phase 3 elimination
  • ab4039b perf: v0.12.19 — zero-alloc captures, 95% less memory (#152)
  • 921d193 perf: flat DFA + integrated prefilter — 35% faster than baseline (#151)
  • bc78fa7 fix: LogParser 7x ARM64 regression — restore DFA for (?m)^ (#149)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/coregx/coregex](https://github.com/coregx/coregex) from 0.12.16 to 0.12.21.
- [Release notes](https://github.com/coregx/coregex/releases)
- [Changelog](https://github.com/coregx/coregex/blob/main/CHANGELOG.md)
- [Commits](coregx/coregex@v0.12.16...v0.12.21)

---
updated-dependencies:
- dependency-name: github.com/coregx/coregex
  dependency-version: 0.12.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from bcessa as a code owner April 1, 2026 00:03
@dependabot dependabot bot added the dependencies Update available for a direct dependency label Apr 1, 2026
@dependabot @github
Copy link
Copy Markdown
Author

dependabot bot commented on behalf of github Apr 2, 2026

Looks like github.com/coregx/coregex is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Apr 2, 2026
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/coregx/coregex-0.12.21 branch April 2, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Update available for a direct dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants