• Russ Cox's avatar
    exp/html/atom: faster Lookup with smaller tables · 19255059
    Russ Cox authored
    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%
    
    R=nigeltao, r
    CC=golang-dev
    https://golang.org/cl/6262051
    19255059
Name
Last commit
Last update
..
atom Loading commit data...
testdata Loading commit data...
testlogs Loading commit data...
const.go Loading commit data...
doc.go Loading commit data...
doctype.go Loading commit data...
entity.go Loading commit data...
entity_test.go Loading commit data...
escape.go Loading commit data...
foreign.go Loading commit data...
node.go Loading commit data...
parse.go Loading commit data...
parse_test.go Loading commit data...
render.go Loading commit data...
render_test.go Loading commit data...
token.go Loading commit data...
token_test.go Loading commit data...