• Dmitriy Vyukov's avatar
    runtime: convert markallocated from C to Go · aac7f1a0
    Dmitriy Vyukov authored
    benchmark                      old ns/op     new ns/op     delta
    BenchmarkMalloc8               28.7          22.4          -21.95%
    BenchmarkMalloc16              44.8          33.8          -24.55%
    BenchmarkMallocTypeInfo8       49.0          32.9          -32.86%
    BenchmarkMallocTypeInfo16      46.7          35.8          -23.34%
    BenchmarkMallocLargeStruct     907           901           -0.66%
    BenchmarkGobDecode             13235542      12036851      -9.06%
    BenchmarkGobEncode             10639699      9539155       -10.34%
    BenchmarkJSONEncode            25193036      21898922      -13.08%
    BenchmarkJSONDecode            96104044      89464904      -6.91%
    
    Fixes #8452.
    
    LGTM=khr
    R=golang-codereviews, bradfitz, rsc, dave, khr
    CC=golang-codereviews
    https://golang.org/cl/122090043
    aac7f1a0
malloc.go 15.9 KB