Skip to content
Opensource internals
  • Posts

Automata

Go's regexp: OnePass, Backtrack and the NFA Fallback

Oct 21, 2026 22 min read Jay Hubbert

regexp.Compile builds a syntax program and then picks one of three engines: one-pass for anchored unambiguous patterns, a bit-state backtracker for small inputs, and a parallel NFA …

GoInternalsRegexpAutomataPerformance

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·