]> Cypherpunks repositories - gostls13.git/commit
runtime: faster & safer hash function
authorKeith Randall <khr@golang.org>
Tue, 12 Mar 2013 17:47:44 +0000 (10:47 -0700)
committerKeith Randall <khr@golang.org>
Tue, 12 Mar 2013 17:47:44 +0000 (10:47 -0700)
commita5d4024139231ca10b5347d17bbf702cfdf5fd5b
tree5ac78c98317c3bcb2b881629d69b225f76afad5f
parent4e032ce301f980d238d876278d60a4937c772814
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
23 files changed:
src/pkg/runtime/alg.c
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/asm_arm.s
src/pkg/runtime/mapspeed_test.go [new file with mode: 0644]
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.h
src/pkg/runtime/signal_linux_386.c
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s
src/pkg/runtime/sys_freebsd_386.s
src/pkg/runtime/sys_freebsd_amd64.s
src/pkg/runtime/sys_netbsd_386.s
src/pkg/runtime/sys_netbsd_amd64.s
src/pkg/runtime/sys_openbsd_386.s
src/pkg/runtime/sys_openbsd_amd64.s
src/pkg/runtime/thread_darwin.c
src/pkg/runtime/thread_freebsd.c
src/pkg/runtime/thread_linux.c
src/pkg/runtime/thread_netbsd.c
src/pkg/runtime/thread_openbsd.c
src/pkg/runtime/thread_windows.c
src/pkg/runtime/vdso_linux_amd64.c