• Nigel Tao's avatar
    cmd/gc: cache itab lookup in convT2I. · 18e86644
    Nigel Tao authored
    There may be further savings if convT2I can avoid the function call
    if the cache is good and T is uintptr-shaped, a la convT2E, but that
    will be a follow-up CL.
    
    src/pkg/runtime:
    benchmark                  old ns/op    new ns/op    delta
    BenchmarkConvT2ISmall             43           15  -64.01%
    BenchmarkConvT2IUintptr           45           14  -67.48%
    BenchmarkConvT2ILarge            130          101  -22.31%
    
    test/bench/go1:
    benchmark                 old ns/op    new ns/op    delta
    BenchmarkBinaryTree17    8588997000   8499058000   -1.05%
    BenchmarkFannkuch11      5300392000   5358093000   +1.09%
    BenchmarkGobDecode         30295580     31040190   +2.46%
    BenchmarkGobEncode         18102070     17675650   -2.36%
    BenchmarkGzip             774191400    771591400   -0.34%
    BenchmarkGunzip           245915100    247464100   +0.63%
    BenchmarkJSONEncode       123577000    121423050   -1.74%
    BenchmarkJSONDecode       451969800    596256200  +31.92%
    BenchmarkMandelbrot200     10060050     10072880   +0.13%
    BenchmarkParse             10989840     11037710   +0.44%
    BenchmarkRevcomp         1782666000   1716864000   -3.69%
    BenchmarkTemplate         798286600    723234400   -9.40%
    
    R=rsc, bradfitz, go.peter.90, daniel.morsing, dave, uriel
    CC=golang-dev
    https://golang.org/cl/6337058
    18e86644
convT2X.go 3.33 KB