]> Cypherpunks repositories - gostls13.git/commit
image/png: optimize encoding image.Gray and image.NRGBA images.
authorNigel Tao <nigeltao@golang.org>
Thu, 13 Sep 2012 05:47:12 +0000 (15:47 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 13 Sep 2012 05:47:12 +0000 (15:47 +1000)
commit237ee3926906ad08a048e764920e036ecdb08b11
tree32f3982431d52260a3dc7041942447b7f1bfedf7
parente7d7ea21d4f0bcb9b90921f4a2d694657cbe4fff
image/png: optimize encoding image.Gray and image.NRGBA images.

benchmark                    old ns/op    new ns/op    delta
BenchmarkEncodeGray           23616080      5624558  -76.18%
BenchmarkEncodeNRGBOpaque     34181260     17144380  -49.84%
BenchmarkEncodeNRGBA          41235820     20345990  -50.66%
BenchmarkEncodePaletted        5594652      5620362   +0.46%
BenchmarkEncodeRGBOpaque      17242210     17168820   -0.43%
BenchmarkEncodeRGBA           66515720     67243560   +1.09%

R=r
CC=golang-dev
https://golang.org/cl/6490099
src/pkg/image/png/writer.go
src/pkg/image/png/writer_test.go