f04f594a1f
The existing implementation has calculated pixels per byte for each pixel. reduce the calculation of pixels per byte. name old time/op new time/op delta EncodeGray-4 2.16ms ± 1% 2.16ms ± 1% -0.28% (p=0.000 n=86+84) EncodeGrayWithBufferPool-4 1.99ms ± 0% 1.97ms ± 0% -0.72% (p=0.000 n=97+92) EncodeNRGBOpaque-4 6.51ms ± 1% 6.48ms ± 1% -0.45% (p=0.000 n=90+85) EncodeNRGBA-4 7.33ms ± 1% 7.28ms ± 0% -0.69% (p=0.000 n=89+87) EncodePaletted-4 5.10ms ± 1% 2.29ms ± 0% -55.11% (p=0.000 n=90+85) EncodeRGBOpaque-4 6.51ms ± 1% 6.51ms ± 0% ~ (p=0.311 n=94+88) EncodeRGBA-4 24.3ms ± 2% 24.1ms ± 1% -0.87% (p=0.000 n=91+91) name old speed new speed delta EncodeGray-4 142MB/s ± 1% 143MB/s ± 1% +0.26% (p=0.000 n=86+85) EncodeGrayWithBufferPool-4 154MB/s ± 0% 156MB/s ± 0% +0.73% (p=0.000 n=97+92) EncodeNRGBOpaque-4 189MB/s ± 1% 190MB/s ± 1% +0.44% (p=0.000 n=90+86) EncodeNRGBA-4 168MB/s ± 1% 169MB/s ± 0% +0.69% (p=0.000 n=89+87) EncodePaletted-4 60.3MB/s ± 1% 134.2MB/s ± 0% +122.74% (p=0.000 n=90+85) EncodeRGBOpaque-4 189MB/s ± 1% 189MB/s ± 0% ~ (p=0.326 n=94+88) EncodeRGBA-4 50.6MB/s ± 2% 51.1MB/s ± 1% +0.87% (p=0.000 n=91+91) name old alloc/op new alloc/op delta EncodeGray-4 852kB ± 0% 852kB ± 0% +0.00% (p=0.000 n=100+100) EncodeGrayWithBufferPool-4 1.49kB ± 2% 1.47kB ± 1% -0.88% (p=0.000 n=95+90) EncodeNRGBOpaque-4 860kB ± 0% 860kB ± 0% +0.00% (p=0.003 n=98+58) EncodeNRGBA-4 864kB ± 0% 864kB ± 0% +0.00% (p=0.021 n=100+99) EncodePaletted-4 849kB ± 0% 849kB ± 0% +0.00% (p=0.040 n=100+100) EncodeRGBOpaque-4 860kB ± 0% 860kB ± 0% ~ (p=0.062 n=66+98) EncodeRGBA-4 3.32MB ± 0% 3.32MB ± 0% -0.00% (p=0.044 n=99+99) name old allocs/op new allocs/op delta EncodeGray-4 32.0 ± 0% 32.0 ± 0% ~ (all equal) EncodeGrayWithBufferPool-4 3.00 ± 0% 3.00 ± 0% ~ (all equal) EncodeNRGBOpaque-4 32.0 ± 0% 32.0 ± 0% ~ (all equal) EncodeNRGBA-4 32.0 ± 0% 32.0 ± 0% ~ (all equal) EncodePaletted-4 36.0 ± 0% 36.0 ± 0% ~ (all equal) EncodeRGBOpaque-4 32.0 ± 0% 32.0 ± 0% ~ (all equal) EncodeRGBA-4 614k ± 0% 614k ± 0% ~ (all equal) Change-Id: I716bde2dc80d8111d75d3d765fc09223f770d5a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/187417 Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
favicon.ico | ||
LICENSE | ||
PATENTS | ||
README.md | ||
robots.txt | ||
SECURITY.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 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.