]> Cypherpunks repositories - gostls13.git/commitdiff
compress/flate: increase the length of hash table from 1<<15 to 1<<17. 0%-16% speedup.
authorIvan Krasin <krasin@golang.org>
Tue, 24 Jan 2012 18:52:45 +0000 (13:52 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 24 Jan 2012 18:52:45 +0000 (13:52 -0500)
R=rsc, imkrasin
CC=golang-dev
https://golang.org/cl/5569048

src/pkg/compress/flate/deflate.go

index 5745336cc895787fa1e2feb891a75788c652399f..1e725890b731e555fbdfd8dce9733b16a771bc7e 100644 (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