Associative array/Creation: Difference between revisions

Line 1,076:
The following implementation includes set and get, and also "generators", which are like iterators except they are closures rather than regular objects.
 
To run this demonstration you need the [http://www.examplexxhash.comnet xxHash] C library. I have written an implementation of SpookyHash in ATS, but using a C library is fine, and requires less ATS code.
 
Because the hash table is an AVL tree, performance will tend to be logarithmic. This assumes a good hash function, of course. With a bad hash function, performance may be linear.
1,448

edits