coriolanus / libhhash Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/libhhash
License: MIT License
Automatically exported from code.google.com/p/libhhash
License: MIT License
HOPSCOTCH HASH TABLE IMPLMENTATION Hash tables are very efficient for key value lookup in both speed and memory usage. Hopscotch hash tables also provide memory locality and cache efficiency by using open addressing and a special method of linear probing. IMPLEMENTATION NOTES The neighborhood of baskets is circular going back after the last element to the first using modulo arithmetic's. Wherever we use a difference (x-y)%n, in order to keep modulo semantics using unsigned variables we add n: (n+x-y)%n, which is basically a nop but guarantees that the result of the subtraction remains positive. We are using the following GCC builtin function to calculate an integer logarithm in base 2: __builtin_clz, count-leading-zeros, returns the number of leading 0-bits in x, starting at the most significant bit position. If x is 0, the result is undefined. BUILDING The code relies, besides the aforementioned builtins, on stdlib.h for the function malloc. TESTING Unit tests can be found from the directory test. To run them use 'make test' target. The tests do not print anything but abort if something has not been as it should. DOCUMENTATION A Unix manual page is in the directory man. This also provides the documentation for the provided functions. CONTACT Jani Lahtinen <[email protected]> REFERENCES Herlihy, Maurice and Shavit, Nir and Tzafrir, Moran, Hopscotch Hashing. DISC '08: Proceedings of the 22nd international symposium on Distributed Computing. Arcachon, France: Springer-Verlag. pp. 350--364, 2008.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.