• Dave Cheney's avatar
    cmd/5g: avoid temporary during OMINUS · 5bdf40dc
    Dave Cheney authored
    Saves one MOVW and one register during the fast div/mod introduced in CL 6819123.
    
    linux/arm (armv5)
    
    benchmark               old ns/op    new ns/op    delta
    BenchmarkInt64Mod1             12           12   +7.50%
    BenchmarkUint16Mod2             7            7   +0.28%
    BenchmarkUint16Mod4             7            7   -0.28%
    BenchmarkUint64Mod1            15           11  -23.72%
    BenchmarkInt8Neg                8            7  -17.66%
    BenchmarkInt16Neg               8            7  -17.66%
    BenchmarkInt32Neg               5            5   -9.04%
    BenchmarkUint8Neg               7            6  -14.35%
    BenchmarkUint16Neg              8            7  -17.66%
    BenchmarkUint32Neg              5            5   -9.04%
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/6842045
    5bdf40dc
gsubr.c 38 KB