• Dave Cheney's avatar
    cmd/5g: avoid temporaries in agen OINDEX · 3dcc63f7
    Dave Cheney authored
    Most benchmarks are within the 3% margin of error. This code path is quite common in the fmt package.
    
    linux/arm, Freescale iMX.53 (cortex-a8)
    
    fmt:
    benchmark                      old ns/op    new ns/op    delta
    BenchmarkSprintfEmpty                925          785  -15.14%
    BenchmarkSprintfString              5050         5039   -0.22%
    BenchmarkSprintfInt                 4425         4406   -0.43%
    BenchmarkSprintfIntInt              5802         5762   -0.69%
    BenchmarkSprintfPrefixedInt         7029         6541   -6.94%
    BenchmarkSprintfFloat              10278        10083   -1.90%
    BenchmarkManyArgs                  18558        17606   -5.13%
    BenchmarkScanInts               15592690     15415360   -1.14%
    BenchmarkScanRecursiveInt       25155020     25050900   -0.41%
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/6921056
    3dcc63f7
cgen.c 32.1 KB