The LZ77 portion of DEFLATE is relatively self-contained. For the decompression side of things, we extract this logic out for the following reasons: * It is easier to test just the LZ77 portion of the logic. * It reduces the noise in the inflate.go Also, we adjust the way that callbacks are handled in the inflate. Instead of using functions to abstract the logical componets of huffmanBlock(), use goto statements to jump between the necessary sections. This is faster since it avoids a function call and is arguably more readable. benchmark old MB/s new MB/s speedup BenchmarkDecodeDigitsSpeed1e4-4 53.62 60.11 1.12x BenchmarkDecodeDigitsSpeed1e5-4 61.90 69.07 1.12x BenchmarkDecodeDigitsSpeed1e6-4 63.24 70.58 1.12x BenchmarkDecodeDigitsDefault1e4-4 54.10 59.00 1.09x BenchmarkDecodeDigitsDefault1e5-4 69.50 74.07 1.07x BenchmarkDecodeDigitsDefault1e6-4 71.54 75.85 1.06x BenchmarkDecodeDigitsCompress1e4-4 54.39 58.94 1.08x BenchmarkDecodeDigitsCompress1e5-4 69.21 73.96 1.07x BenchmarkDecodeDigitsCompress1e6-4 71.14 75.75 1.06x BenchmarkDecodeTwainSpeed1e4-4 53.15 58.13 1.09x BenchmarkDecodeTwainSpeed1e5-4 66.56 72.29 1.09x BenchmarkDecodeTwainSpeed1e6-4 69.13 75.11 1.09x BenchmarkDecodeTwainDefault1e4-4 56.00 60.23 1.08x BenchmarkDecodeTwainDefault1e5-4 77.84 82.27 1.06x BenchmarkDecodeTwainDefault1e6-4 82.07 86.85 1.06x BenchmarkDecodeTwainCompress1e4-4 56.13 60.38 1.08x BenchmarkDecodeTwainCompress1e5-4 78.23 82.62 1.06x BenchmarkDecodeTwainCompress1e6-4 82.38 86.73 1.05x Change-Id: I8c6ae0e6bed652dd0570fc113c999977f5e71636 Reviewed-on: https://go-review.googlesource.com/16528 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
|---|---|---|
| .github | ||
| api | ||
| doc | ||
| lib/time | ||
| misc | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| favicon.ico | ||
| 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.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
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.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that we do not accept pull requests and that we use the issue tracker for bug reports and proposals only. Please ask questions on https://forum.golangbridge.org or https://groups.google.com/forum/#!forum/golang-nuts.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
--
Binary Distribution Notes
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.
