aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.c
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2013-03-20 13:51:29 -0700
committerKeith Randall <khr@golang.org>2013-03-20 13:51:29 -0700
commit00224a356a5be3c134230bfa8fe11e0af2977aaf (patch)
tree215e0ad8bd4fe89b437bf1ef572a0c4f94af489d /src/pkg/runtime/runtime.c
parent2001f0c28ef4f2b7b907d060901a6fad2f1e9eb0 (diff)
downloadgo-00224a356a5be3c134230bfa8fe11e0af2977aaf.tar.xz
runtime: faster hashmap implementation.
Hashtable is arranged as an array of 8-entry buckets with chained overflow. Each bucket has 8 extra hash bits per key to provide quick lookup within a bucket. Table is grown incrementally. Update #3885 Go time drops from 0.51s to 0.34s. R=r, rsc, m3b, dave, bradfitz, khr, ugorji, remyoudompheng CC=golang-dev https://golang.org/cl/7504044
Diffstat (limited to 'src/pkg/runtime/runtime.c')
-rw-r--r--src/pkg/runtime/runtime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c
index ef39a2d55f..d62408118b 100644
--- a/src/pkg/runtime/runtime.c
+++ b/src/pkg/runtime/runtime.c
@@ -42,9 +42,9 @@ runtime·gotraceback(bool *crash)
}
int32
-runtime·mcmp(byte *s1, byte *s2, uint32 n)
+runtime·mcmp(byte *s1, byte *s2, uintptr n)
{
- uint32 i;
+ uintptr i;
byte c1, c2;
for(i=0; i<n; i++) {