]> Cypherpunks repositories - gostls13.git/commit
regexp/syntax: optimize EmptyOpContext
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Aug 2013 21:31:10 +0000 (14:31 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Aug 2013 21:31:10 +0000 (14:31 -0700)
commit90351506d47dad652d9ee8cea56ffb5c50e0e953
tree6aa2c1c59b89f3d3b2beebd58f98b66d5d63be85
parent2fe9a5a3e826d8b2dc45652e1b5d1c23eeeb428b
regexp/syntax: optimize EmptyOpContext

Minor. Saw this in a profile at few percent of CPU and was
curious what it was. Improves overall regexp benchmarks
anywhere from 0 to 3%, but they're a pain to run. You need to
run them in isolation for long runs to get stable numbers.

benchmark                  old ns/op    new ns/op    delta
BenchmarkEmptyOpContext          537          473  -11.92%

R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/13407043
src/pkg/regexp/syntax/prog.go
src/pkg/regexp/syntax/prog_test.go