]> Cypherpunks repositories - gostls13.git/commit
image/draw: remove some bounds checks from DrawYCbCr
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 17 Apr 2016 01:36:07 +0000 (18:36 -0700)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Sun, 17 Apr 2016 06:25:28 +0000 (06:25 +0000)
commit31da093c1e8b82bcba42846a4a8f670452df88f3
tree9a140137e2a2eace561cb7190ba8515f8b4b4501
parent2563b6f9fe76da6c9f95c7766986f4684b80ae6d
image/draw: remove some bounds checks from DrawYCbCr

It’d be nicer to write just

_ = dpix[x+3]

but the compiler isn’t able to reason about offsets
from symbols (yet).

image/draw benchmark:

YCbCr-8   722µs ± 3%   682µs ± 3%  -5.54%  (p=0.000 n=50+50)

Change-Id: Ia1e399496ed87c282bf0f9ca56c0b2d4948a0df9
Reviewed-on: https://go-review.googlesource.com/22146
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/image/internal/imageutil/gen.go
src/image/internal/imageutil/impl.go