]> Cypherpunks repositories - gostls13.git/commit
exp/html/atom: faster, hash-based lookup.
authorNigel Tao <nigeltao@golang.org>
Thu, 31 May 2012 23:36:05 +0000 (09:36 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 31 May 2012 23:36:05 +0000 (09:36 +1000)
commitd2a6098e9c72fdb5acac0dd8992cd174155c1caa
tree9dbfe5cf0e70e96216d4e4cfcbece8ff94b61fec
parentbaf91c313fdd50601f40915fa42a423faa1a5c76
exp/html/atom: faster, hash-based lookup.

exp/html/atom benchmark:
benchmark          old ns/op    new ns/op    delta
BenchmarkLookup       199226        80770  -59.46%

exp/html benchmark:
benchmark                      old ns/op    new ns/op    delta
BenchmarkParser                  4864890      4510834   -7.28%
BenchmarkHighLevelTokenizer      2209192      1969684  -10.84%
benchmark                       old MB/s     new MB/s  speedup
BenchmarkParser                    16.07        17.33    1.08x
BenchmarkHighLevelTokenizer        35.38        39.68    1.12x

R=r
CC=golang-dev
https://golang.org/cl/6261054
src/pkg/exp/html/atom/atom.go
src/pkg/exp/html/atom/atom_test.go
src/pkg/exp/html/atom/gen.go
src/pkg/exp/html/atom/table.go