1
0
mirror of https://github.com/golang/go synced 2024-10-04 15:11:20 -06:00
go/src/image
Nigel Tao e424d59680 image/draw: optimize out some bounds checks.
We could undoubtedly squeeze even more out of these loops, and in the
long term, a better compiler would be smarter with bounds checks, but in
the short term, this small change is an easy win.

benchmark                      old ns/op     new ns/op     delta
BenchmarkFillOver-8            1619470       1323192       -18.29%
BenchmarkCopyOver-8            1129369       1062787       -5.90%
BenchmarkGlyphOver-8           420070        378608        -9.87%

On github.com/golang/freetype/truetype's BenchmarkDrawString:
benchmark                 old ns/op     new ns/op     delta
BenchmarkDrawString-8     9561435       8807019       -7.89%

Change-Id: Ib1c6271ac18bced85e0fb5ebf250dd57d7747e75
Reviewed-on: https://go-review.googlesource.com/14093
Reviewed-by: Rob Pike <r@golang.org>
2015-09-01 00:34:26 +00:00
..
color image/color: fix format typo in the tests. 2015-07-16 01:41:34 +00:00
draw image/draw: optimize out some bounds checks. 2015-09-01 00:34:26 +00:00
gif image/gif: avoid unused assignment 2015-08-24 16:17:42 +00:00
internal/imageutil image/color: tweak the YCbCr to RGBA conversion formula. 2015-07-15 05:29:00 +00:00
jpeg image/jpeg: don't unread a byte if we've already taken bits from it. 2015-07-14 06:21:57 +00:00
png image/png: don't read filter bytes for empty interlace passes. 2015-07-13 06:40:00 +00:00
testdata image/jpeg: support chroma hv values other than 0x11. 2015-03-11 00:10:09 +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: support chroma hv values other than 0x11. 2015-03-11 00:10:09 +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 all: link to https instead of http 2015-07-11 14:36:33 +00:00
names.go
ycbcr_test.go image: add YCbCrSubsampleRatio411 and YCbCrSubsampleRatio410. 2015-02-26 00:14:16 +00:00
ycbcr.go image: add YCbCrSubsampleRatio411 and YCbCrSubsampleRatio410. 2015-02-26 00:14:16 +00:00