Skip to content

Commit

Permalink
improve HashMapTest
Browse files Browse the repository at this point in the history
no 100 trials, there are insanely bad hashes out there.
add stdv, print init times: insert and 1% delete.
skip very bad hashes, like multiply_shift
  • Loading branch information
rurban committed Nov 14, 2019
1 parent 6683bd3 commit 980d833
Show file tree
Hide file tree
Showing 6 changed files with 4,908 additions and 4,480 deletions.
13 changes: 6 additions & 7 deletions HashMapTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ bool HashMapTest ( pfHash pfhash,
const int hashbits, std::vector<std::string> words,
const int trials, bool verbose )
{
printf("Running HashMapTest ");
double mean = HashMapSpeedTest( pfhash, hashbits, words, 1, verbose); //warmup
mean = HashMapSpeedTest( pfhash, hashbits, words, trials, verbose);
printf(" %0.3f cycles/op ", mean);

//delete hashmap;
printf(" ....... PASS\n");
double mean = HashMapSpeedTest( pfhash, hashbits, words, trials, verbose);
// if faster than ~sha1
if (mean > 5. && mean < 1500.)
printf(" ....... PASS\n");
else
printf(" ....... FAIL\n");
return true;
}
Loading

0 comments on commit 980d833

Please sign in to comment.