3 ms·
Not, sure - but I just came across this in the Nim standard library: http://nim-lang.github.io/Nim/pegs.html http://nim-lang.github.io/Nim/pegs.html > Simple
by e12e 5y ago
Not, sure - but I just came across this in the Nim standard library:
http://nim-lang.github.io/Nim/pegs.html http://nim-lang.github.io/Nim/pegs.html
> Simple PEG (Parsing expression grammar) matching. Uses no memorization, but uses superoperators and symbol inlining to improve performance. Note: Matching performance is hopefully competitive with optimized regular expression engines.
- glangdale 5y agoI've written a lot of things that are "hopefully competitive" with something else, but generally benchmarking is the ideal. :-) Hard to benchmark PEG vs regex fairly. Not dismissing it out of hand, as I've had many years to observe the weak spots of regex at quite a short distance.