aboutsummaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2015-09-01 23:42:43 -0700
committerNigel Tao <nigeltao@golang.org>2015-09-03 01:54:35 +0000
commit5c78589b69c87f25a4792d9c8a1446294c07600e (patch)
tree02f1b85aaaf9d22b5de68cb4af44ad84096c0eb5 /src/database
parent9f0baca5054c8039d763f6a4d71d4508e896d546 (diff)
downloadgo-5c78589b69c87f25a4792d9c8a1446294c07600e.tar.xz
compress/flate: simplify inflate logic
The flate library contains generator code, which is used to generate the fixed huffman table. This is done so that fixed blocks can be processed quicker since there is no need generate the decoder table for fixed codes. Instead, delete the precomputed table, and use sync.Once to generate it at runtime when used. Advantages: * Reduces duplicated logic in flate package * Reduces binary size by approximately 2KiB Disadvantages: * For the simplest possible program that simply decodes the fixed block "\x03\x00" once, the modified code takes 4.7% longer for the first decode. Compression performance for subsequent blocks afterwards has no noticeable slow down. Change-Id: I8f351218debf7d732118808859eda481b01011f6 Reviewed-on: https://go-review.googlesource.com/14181 Reviewed-by: Nigel Tao <nigeltao@golang.org>
Diffstat (limited to 'src/database')
0 files changed, 0 insertions, 0 deletions