• Rob Pike's avatar
    encoding/gob: custom array/slice decoders · 9965e402
    Rob Pike authored
    Use go generate to write better loops for decoding arrays,
    just as we did for encoding. It doesn't help as much,
    relatively speaking, but it's still noticeable.
    
    benchmark                          old ns/op     new ns/op     delta
    BenchmarkDecodeComplex128Slice     202348        184529        -8.81%
    BenchmarkDecodeFloat64Slice        135800        120979        -10.91%
    BenchmarkDecodeInt32Slice          121200        105149        -13.24%
    BenchmarkDecodeStringSlice         288129        278214        -3.44%
    
    LGTM=rsc
    R=rsc
    CC=golang-codereviews
    https://golang.org/cl/154420044
    9965e402
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...