1
0
mirror of https://github.com/golang/go synced 2024-10-04 03:21:22 -06:00
go/src/image
Nigel Tao f782a7e075 image/draw: optimize drawFillOver as drawFillSrc for opaque fills.
Benchmarks are much better for opaque fills and slightly worse on non
opaque fills. I think that on balance, this is still a win.

When the source is uniform(color.RGBA{0x11, 0x22, 0x33, 0xff}):
name        old time/op  new time/op  delta
FillOver-8   966µs ± 1%    32µs ± 1%  -96.67%  (p=0.000 n=10+10)
FillSrc-8   32.4µs ± 1%  32.2µs ± 1%     ~      (p=0.053 n=9+10)

When the source is uniform(color.RGBA{0x11, 0x22, 0x33, 0x44}):
name        old time/op  new time/op  delta
FillOver-8   962µs ± 0%  1018µs ± 0%  +5.85%   (p=0.000 n=9+10)
FillSrc-8   32.2µs ± 1%  32.1µs ± 0%    ~     (p=0.148 n=10+10)

Change-Id: I52ec6d5fcd0fbc6710cef0e973a21ee7827c0dd9
Reviewed-on: https://go-review.googlesource.com/28790
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-09-09 01:17:26 +00:00
..
color image/color: optimize RGBToYCbCr 2016-04-27 06:19:37 +00:00
draw image/draw: optimize drawFillOver as drawFillSrc for opaque fills. 2016-09-09 01:17:26 +00:00
gif image/gif: accept an out-of-bounds transparent color index. 2016-04-29 00:01:22 +00:00
internal/imageutil image/draw: remove some bounds checks from DrawYCbCr 2016-04-17 06:25:28 +00:00
jpeg image/jpeg: reconstruct progressive images even if incomplete. 2016-03-31 00:33:24 +00:00
png image/png: ignore trailing IDAT chunks 2016-03-24 10:57:01 +00:00
testdata image/jpeg: reconstruct progressive images even if incomplete. 2016-03-31 00:33:24 +00:00
decode_example_test.go image/color: tweak the YCbCr to RGBA conversion formula. 2015-07-15 05:29:00 +00:00
decode_test.go image/jpeg: reconstruct progressive images even if incomplete. 2016-03-31 00:33:24 +00:00
format.go
geom_test.go image: change Rectangle.Eq to return true for all empty rectangles, even 2015-02-18 23:50:09 +00:00
geom.go image: make Rectangle implement Image. 2015-03-04 00:03:46 +00:00
image_test.go
image.go image: add NYCbCrA types. 2015-10-11 11:07:25 +00:00
names.go
ycbcr_test.go image: add YCbCrSubsampleRatio411 and YCbCrSubsampleRatio410. 2015-02-26 00:14:16 +00:00
ycbcr.go image: add NYCbCrA types. 2015-10-11 11:07:25 +00:00