Descriptioncmd/gc: apply escape analysis results to closures.
This avoids an allocation when closures are used
as "macros", in Walk idioms, or as argument to defer.
benchmark old ns/op new ns/op delta
BenchmarkSearchWrappers 1171 354 -69.77%
BenchmarkCallClosure 3 3 -12.54%
BenchmarkCallClosure1 119 7 -93.95%
BenchmarkCallClosure2 183 74 -59.18%
BenchmarkCallClosure3 187 75 -59.57%
BenchmarkCallClosure4 187 76 -58.98%
Compared to Go 1:
benchmark old ns/op new ns/op delta
BenchmarkSearchWrappers 3208 354 -88.97%
Fixes issue 3520.
Patch Set 1 #Patch Set 2 : diff -r 5b495d0aefcf https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 5b495d0aefcf https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 4 : diff -r 886c91b4ae3c https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 3b285c00863b https://go.googlecode.com/hg/ #Patch Set 6 : diff -r 8e4103edc064 https://go.googlecode.com/hg/ #MessagesTotal messages: 13
|