Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
regexp: onepass regexp.Match allocates memory unnecessarily #19573
Please answer these questions before submitting your issue. Thanks!
What did you do?
I noticed that
(This is go tool pprof output profiling against my program, so it contains m.backtrack allocations too, but please ignore it (L439).)
As for matching of non onepass regex (e.g.
What did you expect to see?
No allocation for regexp.Match of onepass regexp.
See CL for benchmark script.
What did you see instead?
1 allocation for regexp.Match of onepass regexp at L450 (