• Jeff R. Allen's avatar
    bzip2: improve performance · 6d248cec
    Jeff R. Allen authored
    Improve performance of move-to-front by using cache-friendly
    copies instead of doubly-linked list. Simplify so that the
    underlying slice is the object. Remove the n=0 special case,
          which was actually slower with the copy approach.
    
    benchmark                 old ns/op     new ns/op     delta
    BenchmarkDecodeDigits     26429714      23859699      -9.72%
    BenchmarkDecodeTwain      76684510      67591946      -11.86%
    
    benchmark                 old MB/s     new MB/s     speedup
    BenchmarkDecodeDigits     1.63         1.81         1.11x
    BenchmarkDecodeTwain      1.63         1.85         1.13x
    
    Updates #6754.
    
    LGTM=adg, agl, josharian
    R=adg, agl, josharian
    CC=golang-codereviews
    https://golang.org/cl/131840043
    6d248cec
Name
Last commit
Last update
..
bzip2 Loading commit data...
flate Loading commit data...
gzip Loading commit data...
lzw Loading commit data...
testdata Loading commit data...
zlib Loading commit data...