1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:34:40 -07:00

compress/flate: increase the length of hash table from 1<<15 to 1<<17. 0%-16% speedup.

R=rsc, imkrasin
CC=golang-dev
https://golang.org/cl/5569048
This commit is contained in:
Ivan Krasin 2012-01-24 13:52:45 -05:00 committed by Russ Cox
parent da6d835b90
commit 565e140a16

View File

@ -27,7 +27,7 @@ const (
// stop things from getting too large.
maxFlateBlockTokens = 1 << 14
maxStoreBlockSize = 65535
hashBits = 15
hashBits = 17
hashSize = 1 << hashBits
hashMask = (1 << hashBits) - 1
hashShift = (hashBits + minMatchLength - 1) / minMatchLength