Information
cl -Fems.exe driver-sample.cpp Support.cpp /EHa /Za /W4 /WX /MTd /D_CRT_SECURE_NO_DEPRECATE
g++ -o gnu driver-sample.cpp Support.cpp -Wextra -Wall -std=c++14 -pedantic -Wconversion -O2 -g
unsigned stride = 1; // assume linear probing // If we are doing double hashing, get the stride/increment if (Config_.SecondaryHashFunc_) stride = Config_.SecondaryHashFunc_(Key, TableSize_ - 1) + 1;
Simple GUI for Viewing
The GUI shows the hash values of the keys as you move the mouse over them. Makes it easy to see where the keys will be inserted. (The screenshots below do not show this feature.)
After performing the same steps that are done in the TestDoubleHashing function from the console driver:
The hash functions can be displayed so you can see how they work:
Other Data
| None (LP) | Simple | RS | Universal | PJW | |
|---|---|---|---|---|---|
| Simple | 31.240 | 8.560 | 3.067 | 2.147 | 2.533 |
| RS | 7.667 | 3.507 | 2.213 | 3.133 | 2.147 |
| Universal | 1.493 | 2.040 | 2.520 | 2.427 | 2.200 |
| PJW | 1.120 | 1.107 | 1.440 | 1.160 | 1.347 |
| None (LP) | Simple | RS | Universal | PJW | |
|---|---|---|---|---|---|
| Simple | 40.221 | 10.579 | 5.347 | 2.758 | 4.053 |
| RS | 11.126 | 4.442 | 3.600 | 5.600 | 3.295 |
| Universal | 1.853 | 2.800 | 3.084 | 3.526 | 3.337 |
| PJW | 1.621 | 1.789 | 2.432 | 1.905 | 2.147 |