h(x) = sum( a[0] + a[1] + ... a[n-1] )
-allowing overflow
then bucket = h(x) / prime number near 5 million
use linked list off has table of 5 million buckets...
like struct {
KEY char[21]
PVOID next; 4 byte pointer
}
generate random 10 million 20 char 'KEYS' ... it doesn't matter if they are
readable...just 0..255 in value per BYTE.
I'll want to review the code after your test.
We should get 1 million / second or higher...just my guess.
This should be in C/C++ not C# or other.
Sunday, August 5, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment