Skip to content

Commit

Permalink
bootest arguments update
Browse files Browse the repository at this point in the history
  • Loading branch information
rizkg committed Feb 12, 2019
1 parent 1872c94 commit bc7dfa0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,21 @@ File Bootest.cpp contains more options, use ./Bootest with -check to check corr

Here is a sample output :

$./Bootest 100000000 8 -check -bench


./Bootest 100000000 8 1.0 -check -bench
key file generated
Construct a BooPHF with 100000000 elements
[Building BooPHF] 100 % elapsed: 0 min 31 sec remaining: 0 min 0 sec
BooPHF constructed perfect hash for 100000000 keys in 30.95s
Bitarray 305808384 bits (99.49 %) (array + ranks )
final hash 1557024 bits (0.51 %) (nb in final hash 4634)
boophf bits/elem : 3.073654
for info, total work write each : 3.718 total work inram from level 8 : 9.408 total work raw : 25.000
[Building BooPHF] 100 % elapsed: 0 min 10 sec remaining: 0 min 0 sec
BooPHF constructed perfect hash for 100000000 keys in 10.25s
Bitarray 305808384 bits (100.00 %) (array + ranks )
Last level hash 0 bits (0.00 %) (nb in last level hash 0)
boophf bits/elem : 3.058084
--- boophf working correctly ---
bench lookups sample size 9999872
BBhash bench lookups average 258.06 ns +- stddev 5.55 % (fingerprint 5000111281850410)

bench lookups sample size 10000000
BBhash bench lookups average 243.84 ns +- stddev 13.01 % (fingerprint 4999580507664480)



Expand Down
10 changes: 10 additions & 0 deletions bootest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ int main (int argc, char* argv[]){
gammaFactor = atoi(argv[3]);
}



for (int ii=4; ii<argc; ii++){
if(!strcmp("-check",argv[ii])) check_correctness= true;
if(!strcmp("-bench",argv[ii])) bench_lookup= true;
Expand All @@ -496,6 +498,14 @@ int main (int argc, char* argv[]){
}


if(gammaFactor == 0) {
fprintf(stderr,"gamma value error\n");
fprintf(stderr,"Usage should be \n");
fprintf(stderr,"%s <nelem> <nthreads> <gamma> [options]\n",argv[0]);
exit(1);
}


// ///testing terator
// printf("testing terator :\n");
// uint64_range terator_in = uint64_range(10,10);
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CC=/usr/bin/g++
CXX ?= g++
CFLAGS = -O3 -std=c++11 -lpthread
CFLAGS = -O3 -std=c++11 -lpthread -Wno-unused-result -Wno-format
EXEC=Bootest example example_custom_hash
all: $(EXEC)

Expand Down

0 comments on commit bc7dfa0

Please sign in to comment.