Descriptionexp/html/atom: faster Lookup with smaller tables
Use perfect cuckoo hash, to avoid binary search.
Define Atom bits as offset+len in long string instead
of enumeration, to avoid string headers.
Before: 1909 string bytes + 6060 tables = 7969 total data
After: 1406 string bytes + 2048 tables = 3454 total data
benchmark old ns/op new ns/op delta
BenchmarkLookup 83878 64681 -22.89%
Patch Set 1 #Patch Set 2 : diff -r a621ac756347 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r a621ac756347 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r a621ac756347 https://go.googlecode.com/hg/ #
Total comments: 9
Patch Set 5 : diff -r ef2c01ba22d1 https://go.googlecode.com/hg/ #Patch Set 6 : diff -r ef2c01ba22d1 https://go.googlecode.com/hg/ #Patch Set 7 : diff -r ef2c01ba22d1 https://go.googlecode.com/hg/ #
Total comments: 3
Patch Set 8 : diff -r 31e36672e3df https://go.googlecode.com/hg/ #
MessagesTotal messages: 12
|