• Russ Cox's avatar
    runtime: aggregate defer allocations · 0de71619
    Russ Cox authored
    benchmark             old ns/op    new ns/op    delta
    BenchmarkDefer              165          113  -31.52%
    BenchmarkDefer10            155          103  -33.55%
    BenchmarkDeferMany          216          158  -26.85%
    
    benchmark            old allocs   new allocs    delta
    BenchmarkDefer                1            0  -100.00%
    BenchmarkDefer10              1            0  -100.00%
    BenchmarkDeferMany            1            0  -100.00%
    
    benchmark             old bytes    new bytes    delta
    BenchmarkDefer               64            0  -100.00%
    BenchmarkDefer10             64            0  -100.00%
    BenchmarkDeferMany           64           66    3.12%
    
    Fixes #2364.
    
    R=ken2
    CC=golang-dev
    https://golang.org/cl/7001051
    0de71619
runtime_test.go 1.3 KB