From 670e711dd19510316ecaa1f30d78f16ba66492f6 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 17 Mar 2001 09:31:06 +0000 Subject: Use a generic implementation of the Fowler/Noll/Vo hash (FNV hash). Make the name cache hash as well as the nfsnode hash use it. As a special tweak, create an unsigned version of register_t. This allows us to use a special tweak for the 64 bit versions that significantly speeds up the i386 version (ie: int64 XOR int64 is slower than int64 XOR int32). The code layout is a little strange for the string function, but I was able to get between 5 to 10% improvement over the original version I started with. The layout affects gcc code generation choices and this way was fastest on x86 and alpha. Note that 'CPUTYPE=p3' etc makes a fair difference to this. It is around 45% faster with -march=pentiumpro on a p6 cpu. --- sys/alpha/include/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/alpha/include') diff --git a/sys/alpha/include/types.h b/sys/alpha/include/types.h index 087c175..8ca3c6b 100644 --- a/sys/alpha/include/types.h +++ b/sys/alpha/include/types.h @@ -56,8 +56,8 @@ typedef long vm_ooffset_t; typedef unsigned long vm_pindex_t; typedef unsigned long vm_size_t; - typedef __int64_t register_t; +typedef __uint64_t u_register_t; #ifdef _KERNEL typedef long intfptr_t; -- cgit v1.1