Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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 (