There were no allocations in regexp.Match for *non* onepass regex because m.matchcap length is reset to zero (ncap=0 for regexp.Match). But, as for onepass regex, m.matchcap length remains as it is even when ncap=0 and it leads needless allocations. benchmark old ns/op new ns/op delta BenchmarkMatch_onepass_regex/32-4 6465 4628 -28.41% BenchmarkMatch_onepass_regex/1K-4 208324 151558 -27.25% Benchm