diff options
| author | Keith Randall <khr@golang.org> | 2013-03-12 10:47:44 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2013-03-12 10:47:44 -0700 |
| commit | a5d4024139231ca10b5347d17bbf702cfdf5fd5b (patch) | |
| tree | 5ac78c98317c3bcb2b881629d69b225f76afad5f /src/pkg/runtime/runtime.c | |
| parent | 4e032ce301f980d238d876278d60a4937c772814 (diff) | |
| download | go-a5d4024139231ca10b5347d17bbf702cfdf5fd5b.tar.xz | |
runtime: faster & safer hash function
Uses AES hardware instructions on 386/amd64 to implement
a fast hash function. Incorporates a random key to
thwart hash collision DOS attacks.
Depends on CL#7548043 for new assembly instructions.
Update #3885
Helps some by making hashing faster. Go time drops from
0.65s to 0.51s.
R=rsc, r, bradfitz, remyoudompheng, khr, dsymonds, minux.ma, elias.naur
CC=golang-dev
https://golang.org/cl/7543043
Diffstat (limited to 'src/pkg/runtime/runtime.c')
| -rw-r--r-- | src/pkg/runtime/runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c index d3ee2a0ec9..3ff4d7fa7e 100644 --- a/src/pkg/runtime/runtime.c +++ b/src/pkg/runtime/runtime.c @@ -75,6 +75,11 @@ runtime·args(int32 c, uint8 **v) int32 runtime·isplan9; int32 runtime·iswindows; +// Information about what cpu features are available. +// Set on startup in asm_{x86/amd64}.s. +uint32 runtime·cpuid_ecx; +uint32 runtime·cpuid_edx; + void runtime·goargs(void) { |
