diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2011-05-02 07:26:40 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2011-05-02 07:26:40 -0700 |
| commit | 807ce2719c243f6d8640de774599e3335883eacb (patch) | |
| tree | 3a42eef56a6890bfaef6ba4e186dfbcc377649eb /src/pkg/runtime/linux | |
| parent | 437015bbed3c669dc58c5e93ee4a6f548f5ebc98 (diff) | |
| download | go-807ce2719c243f6d8640de774599e3335883eacb.tar.xz | |
jpeg: speed up RGBA encoding ~%50
Avoids image.At(), color.RGBA(), opposing 8 bit shifts,
and min function calls in a loop. Not as pretty as before,
but the pure version is still there to revert back to
later if/when the compiler gets better.
before (best of 5)
jpeg.BenchmarkEncodeRGBOpaque 50 64781360 ns/op 18.97 MB/s
after (best of 5)
jpeg.BenchmarkEncodeRGBOpaque 50 42044300 ns/op 29.23 MB/s
(benchmarked on an HP z600; 16 core Xeon E5520 @ 2.27Ghz)
R=r, r2, nigeltao
CC=golang-dev
https://golang.org/cl/4433088
Diffstat (limited to 'src/pkg/runtime/linux')
0 files changed, 0 insertions, 0 deletions
