image: add benchmarks for At and Set methods

Added in preparation for looking at some optimizations around bounds
checks.

BenchmarkAt/rgba-8            100000000     18.5 ns/op      4 B/op   1 allocs/op
BenchmarkAt/rgba64-8          100000000     22.9 ns/op      8 B/op   1 allocs/op
BenchmarkAt/nrgba-8           100000000     18.8 ns/op      4 B/op   1 allocs/op
BenchmarkAt/nrgba64-8         100000000     22.1 ns/op      8 B/op   1 allocs/op
BenchmarkAt/alpha-8           100000000     14.6 ns/op      1 B/op   1 allocs/op
BenchmarkAt/alpha16-8         200000000     6.46 ns/op      0 B/op   0 allocs/op
BenchmarkAt/gray-8            100000000     14.3 ns/op      1 B/op   1 allocs/op
BenchmarkAt/gray16-8          200000000     6.45 ns/op      0 B/op   0 allocs/op
BenchmarkAt/paletted-8        300000000     4.28 ns/op      0 B/op   0 allocs/op
BenchmarkSet/rgba-8           50000000      39.2 ns/op      8 B/op   2 allocs/op
BenchmarkSet/rgba64-8         30000000      45.8 ns/op     16 B/op   2 allocs/op
BenchmarkSet/nrgba-8          50000000      39.3 ns/op      8 B/op   2 allocs/op
BenchmarkSet/nrgba64-8        30000000      45.6 ns/op     16 B/op   2 allocs/op
BenchmarkSet/alpha-8          50000000      34.5 ns/op      2 B/op   2 allocs/op
BenchmarkSet/alpha16-8        50000000      34.9 ns/op      4 B/op   2 allocs/op
BenchmarkSet/gray-8           100000000     20.3 ns/op      1 B/op   1 allocs/op
BenchmarkSet/gray16-8         50000000      36.2 ns/op      4 B/op   2 allocs/op
BenchmarkSet/paletted-8       50000000      39.5 ns/op      1 B/op   1 allocs/op
BenchmarkRGBAAt-8             500000000     3.74 ns/op
BenchmarkRGBASetRGBA-8        300000000     4.33 ns/op
BenchmarkRGBA64At-8           300000000     5.06 ns/op
BenchmarkRGBA64SetRGBA64-8    200000000     6.61 ns/op
BenchmarkNRGBAAt-8            500000000     3.69 ns/op
BenchmarkNRGBASetNRGBA-8      300000000     4.06 ns/op
BenchmarkNRGBA64At-8          300000000     4.98 ns/op
BenchmarkNRGBA64SetNRGBA64-8  200000000     6.62 ns/op
BenchmarkAlphaAt-8            2000000000    1.43 ns/op
BenchmarkAlphaSetAlpha-8      2000000000    1.55 ns/op
BenchmarkAlpha16At-8          1000000000    2.87 ns/op
BenchmarkAlphaSetAlpha16-8    500000000     3.27 ns/op
BenchmarkGrayAt-8             2000000000    1.43 ns/op
BenchmarkGraySetGray-8        2000000000    1.55 ns/op
BenchmarkGray16At-8           1000000000    2.87 ns/op
BenchmarkGraySetGray16-8      500000000     3.14 ns/op

Updates #14884

Change-Id: I349fb214ee75f13ecbc62ac22a40e3b337648f60
Reviewed-on: https://go-review.googlesource.com/136796
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
1 file changed
tree: 352f56498a504faa566265bf69c44b05c3ba2ab4
  1. .github/
  2. api/
  3. doc/
  4. lib/
  5. misc/
  6. src/
  7. test/
  8. .gitattributes
  9. .gitignore
  10. AUTHORS
  11. CONTRIBUTING.md
  12. CONTRIBUTORS
  13. favicon.ico
  14. LICENSE
  15. PATENTS
  16. README.md
  17. robots.txt
README.md

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://golang.org/dl/.

After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.