diff options
author | Keith Randall <khr@golang.org> | 2014-07-16 14:16:19 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2014-07-16 14:16:19 -0700 |
commit | 5180f53088de94c879eccd80311877f1541e3ed1 (patch) | |
tree | e5be9ba1979d807e4e9c4e8b93d53f9a81dac011 /src/cmd/dist | |
parent | 23fcb0e2ae380ba7dd1202291da92da0c267ce93 (diff) | |
download | go-5180f53088de94c879eccd80311877f1541e3ed1.tar.gz |
runtime: convert map implementation to Go.
It's a bit slower, but not painfully so. There is still room for
improvement (saving space so we can use nosplit, and removing the
requirement for hash/eq stubs).
benchmark old ns/op new ns/op delta
BenchmarkMegMap 23.5 24.2 +2.98%
BenchmarkMegOneMap 14.9 15.7 +5.37%
BenchmarkMegEqMap 71668 72234 +0.79%
BenchmarkMegEmptyMap 4.05 4.93 +21.73%
BenchmarkSmallStrMap 21.9 22.5 +2.74%
BenchmarkMapStringKeysEight_16 23.1 26.3 +13.85%
BenchmarkMapStringKeysEight_32 21.9 25.0 +14.16%
BenchmarkMapStringKeysEight_64 21.9 25.1 +14.61%
BenchmarkMapStringKeysEight_1M 21.9 25.0 +14.16%
BenchmarkIntMap 21.8 12.5 -42.66%
BenchmarkRepeatedLookupStrMapKey32 39.3 30.2 -23.16%
BenchmarkRepeatedLookupStrMapKey1M 322353 322675 +0.10%
BenchmarkNewEmptyMap 129 136 +5.43%
BenchmarkMapIter 137 107 -21.90%
BenchmarkMapIterEmpty 7.14 8.71 +21.99%
BenchmarkSameLengthMap 5.24 6.82 +30.15%
BenchmarkBigKeyMap 34.5 35.3 +2.32%
BenchmarkBigValMap 36.1 36.1 +0.00%
BenchmarkSmallKeyMap 26.9 26.7 -0.74%
LGTM=rsc
R=golang-codereviews, dave, dvyukov, rsc, gobot, khr
CC=golang-codereviews
https://codereview.appspot.com/99380043
Diffstat (limited to 'src/cmd/dist')
-rw-r--r-- | src/cmd/dist/buildruntime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/dist/buildruntime.c b/src/cmd/dist/buildruntime.c index b36454f80..4e5295b65 100644 --- a/src/cmd/dist/buildruntime.c +++ b/src/cmd/dist/buildruntime.c @@ -231,6 +231,8 @@ ok: aggr = "cbctxt"; else if(streq(fields.p[1], "SEH")) aggr = "seh"; + else if(streq(fields.p[1], "Alg")) + aggr = "alg"; } if(hasprefix(lines.p[i], "}")) aggr = nil; |