Don't sort the first 127 entries in the string table.
Gives a small .1% gain. In my design, I try to use the smallest integers as much as possible so that deflate's entropy coder works more efficiently.
This commit is contained in:
parent
4f013ebbfc
commit
fbfba3bdea
|
|
@ -53,7 +53,10 @@ public class StringTable {
|
||||||
// Each group of keys that serializes to the same number of bytes is
|
// Each group of keys that serializes to the same number of bytes is
|
||||||
// sorted lexiconographically.
|
// sorted lexiconographically.
|
||||||
// to maximize deflate compression.
|
// to maximize deflate compression.
|
||||||
Arrays.sort(set, Math.min(0, set.length-1), Math.min(1 << 7, set.length-1));
|
|
||||||
|
// Don't sort the first array. There's not likely to be much benefit, and we want frequent values to be small.
|
||||||
|
//Arrays.sort(set, Math.min(0, set.length-1), Math.min(1 << 7, set.length-1));
|
||||||
|
|
||||||
Arrays.sort(set, Math.min(1 << 7, set.length-1), Math.min(1 << 14,
|
Arrays.sort(set, Math.min(1 << 7, set.length-1), Math.min(1 << 14,
|
||||||
set.length-1));
|
set.length-1));
|
||||||
Arrays.sort(set, Math.min(1 << 14, set.length-1), Math.min(1 << 21,
|
Arrays.sort(set, Math.min(1 << 14, set.length-1), Math.min(1 << 21,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue