Descriptionjpeg: 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)
Patch Set 1 #Patch Set 2 : diff -r 304d7d2b1d6c https://go.googlecode.com/hg #Patch Set 3 : diff -r 304d7d2b1d6c https://go.googlecode.com/hg #Patch Set 4 : diff -r 66eb68cbd5c2 https://go.googlecode.com/hg/ #MessagesTotal messages: 5
|