Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(106)

Issue 6242056: code review 6242056: image/png: optimize the paeth filter implementation. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by nigeltao
Modified:
10 years, 2 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

image/png: optimize the paeth filter implementation. image/png benchmarks: benchmark old ns/op new ns/op delta BenchmarkPaeth 10 7 -29.21% BenchmarkDecodeGray 2381745 2241620 -5.88% BenchmarkDecodeNRGBAGradient 9535555 8835100 -7.35% BenchmarkDecodeNRGBAOpaque 8189590 7611865 -7.05% BenchmarkDecodePaletted 1300688 1301940 +0.10% BenchmarkDecodeRGB 6760146 6317082 -6.55% BenchmarkEncodePaletted 6048596 6122666 +1.22% BenchmarkEncodeRGBOpaque 18891140 19474230 +3.09% BenchmarkEncodeRGBA 78945350 78552600 -0.50% Wall time for Denis Cheremisov's PNG-decoding program given in https://groups.google.com/group/golang-nuts/browse_thread/thread/22aa8a05040fdd49 Before: 2.25s After: 2.27s Delta: +1% The same program, but with a different PNG input file (http://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png) and only 100 iterations instead of 1000 Before: 4.78s After: 4.42s Delta: -8%

Patch Set 1 #

Patch Set 2 : diff -r dd70f64136b7 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r dd70f64136b7 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 00a25723a7cd https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -12 lines) Patch
A src/pkg/image/png/paeth_test.go View 1 1 chunk +51 lines, -0 lines 0 comments Download
M src/pkg/image/png/reader.go View 1 2 chunks +21 lines, -12 lines 0 comments Download

Messages

Total messages: 6
nigeltao
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 2 months ago (2012-05-25 03:09:25 UTC) #1
rsc
LGTM You might also try making paeth take int arguments. I'm a little surprised that ...
10 years, 2 months ago (2012-05-25 03:34:54 UTC) #2
nigeltao
On 25 May 2012 13:34, Russ Cox <rsc@golang.org> wrote: > You might also try making ...
10 years, 2 months ago (2012-05-25 04:08:03 UTC) #3
nigeltao
*** Submitted as http://code.google.com/p/go/source/detail?r=40632db23c46 *** image/png: optimize the paeth filter implementation. image/png benchmarks: benchmark old ...
10 years, 2 months ago (2012-05-25 04:09:03 UTC) #4
nigeltao
FYI, I just "hg sync"ed, ran all.bash (which re-built the compiler) and re-ran the benchmarks. ...
10 years, 2 months ago (2012-05-25 04:27:53 UTC) #5
rsc
10 years, 2 months ago (2012-05-25 04:42:33 UTC) #6
It's probably not worthwhile to look through history.
If you want to investigate, run pprof before and after
on a significantly-changed benchmark and compare
what lines or assembly instructions take the most time.

Russ
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b