Descriptionbzip2: improve performance
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 issue 6754.
Patch Set 1 #Patch Set 2 : diff -r a8a6e765d6a87f7ccb71fd85a60eb5a821151f85 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r a8a6e765d6a87f7ccb71fd85a60eb5a821151f85 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r a8a6e765d6a87f7ccb71fd85a60eb5a821151f85 https://go.googlecode.com/hg/ #
Total comments: 6
Patch Set 5 : diff -r 3cf190969915d6d531acd0795eb81974aaa64d19 https://go.googlecode.com/hg/ #MessagesTotal messages: 8
|