• Rui Ueyama's avatar
    image/png: use branch-free abs function · 0100afbd
    Rui Ueyama authored
    benchmark                        old ns/op     new ns/op     delta
    BenchmarkPaeth                   5.06          6.02          +18.97%
    BenchmarkDecodeGray              1010551       956911        -5.31%
    BenchmarkDecodeNRGBAGradient     3877813       3754160       -3.19%
    BenchmarkDecodeNRGBAOpaque       3194058       3079094       -3.60%
    BenchmarkDecodePaletted          699243        700211        +0.14%
    BenchmarkDecodeRGB               2835733       2692120       -5.06%
    BenchmarkDecodeInterlacing       3651805       3563124       -2.43%
    BenchmarkEncodeGray              4399183       4404113       +0.11%
    BenchmarkEncodeNRGBOpaque        13323627      13306485      -0.13%
    BenchmarkEncodeNRGBA             15840092      15751188      -0.56%
    BenchmarkEncodePaletted          4396622       4404373       +0.18%
    BenchmarkEncodeRGBOpaque         13320475      13279189      -0.31%
    BenchmarkEncodeRGBA              36898392      36781002      -0.32%
    
    LGTM=nigeltao
    R=nigeltao
    CC=golang-codereviews
    https://golang.org/cl/117290043
    0100afbd
Name
Last commit
Last update
..
color Loading commit data...
draw Loading commit data...
gif Loading commit data...
jpeg Loading commit data...
png Loading commit data...
testdata Loading commit data...
decode_example_test.go Loading commit data...
decode_test.go Loading commit data...
format.go Loading commit data...
geom.go Loading commit data...
image.go Loading commit data...
image_test.go Loading commit data...
names.go Loading commit data...
ycbcr.go Loading commit data...
ycbcr_test.go Loading commit data...