Skip to content

Commit fb1d06a

Browse files
author
Daniel Lemire
committed
Cleaning
1 parent 7279984 commit fb1d06a

File tree

14 files changed

+2381
-2253
lines changed

14 files changed

+2381
-2253
lines changed

benchmarks/bulk-insert-and-query.cc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ int main(int argc, char * argv[]) {
439439
};
440440

441441
// Parameter Parsing ----------------------------------------------------------
442+
const char * add_count_str;
442443

443444
if (argc < 2) {
444445
cout << "Usage: " << argv[0] << " <numberOfEntries> [<algorithmId> [<seed>]]" << endl;
@@ -450,13 +451,16 @@ int main(int argc, char * argv[]) {
450451
}
451452
cout << " algorithmId: can also be set to the string 'all' if you want to run them all, including some that are excluded by default" << endl;
452453
cout << " seed: seed for the PRNG; -1 for random seed (default)" << endl;
453-
return 1;
454+
cout << endl;
455+
add_count_str = "10000000";
456+
} else {
457+
add_count_str = argv[1];
454458
}
455-
stringstream input_string(argv[1]);
459+
stringstream input_string(add_count_str);
456460
size_t add_count;
457461
input_string >> add_count;
458462
if (input_string.fail()) {
459-
cerr << "Invalid number: " << argv[1];
463+
cerr << "Invalid number: " << add_count_str << endl;
460464
return 2;
461465
}
462466
int algorithmId = -1; // -1 is just the default
@@ -737,7 +741,7 @@ int main(int argc, char * argv[]) {
737741
cout << setw(NAME_WIDTH) << names[a] << cf << endl;
738742
}
739743
a = 31;
740-
if (algorithmId == a || algorithmId < 0 || (algos.find(a) != algos.end())) {
744+
if (algorithmId == a || (algos.find(a) != algos.end())) {
741745
auto cf = FilterBenchmark<
742746
VQFilter<uint64_t, SimpleMixSplit>>(
743747
add_count, to_add, intersectionsize, mixed_sets, true, false);
@@ -746,29 +750,29 @@ int main(int argc, char * argv[]) {
746750
#endif
747751
#if __PF_AVX512__
748752
a = 32;
749-
if (algorithmId == a || algorithmId < 0 || (algos.find(a) != algos.end())) {
753+
if (algorithmId == a || (algos.find(a) != algos.end())) {
750754
auto cf = FilterBenchmark<
751755
TC_shortcut<SimpleMixSplit>>(
752756
add_count, to_add, intersectionsize, mixed_sets, false, false /* set to true to support deletions. */);
753757
cout << setw(NAME_WIDTH) << names[a] << cf << endl;
754758
}
755759
// Prefix ---------------------------------------------------------
756760
a = 35;
757-
if (algorithmId == a || algorithmId < 0 || (algos.find(a) != algos.end())) {
761+
if (algorithmId == a || (algos.find(a) != algos.end())) {
758762
auto cf = FilterBenchmark<
759763
Prefix_Filter<TC_shortcut<SimpleMixSplit>>>(
760764
add_count, to_add, intersectionsize, mixed_sets, false, false);
761765
cout << setw(NAME_WIDTH) << names[a] << cf << endl;
762766
}
763767
a = 36;
764-
if (algorithmId == a || algorithmId < 0 || (algos.find(a) != algos.end())) {
768+
if (algorithmId == a || (algos.find(a) != algos.end())) {
765769
auto cf = FilterBenchmark<
766770
Prefix_Filter<CuckooFilterStable<uint64_t, 12, SingleTable, SimpleMixSplit>>>(
767771
add_count, to_add, intersectionsize, mixed_sets, false, false);
768772
cout << setw(NAME_WIDTH) << names[a] << cf << endl;
769773
}
770774
a = 37;
771-
if (algorithmId == a || algorithmId < 0 || (algos.find(a) != algos.end())) {
775+
if (algorithmId == a || (algos.find(a) != algos.end())) {
772776
auto cf = FilterBenchmark<
773777
Prefix_Filter<SimdBlockFilterFixed<SimpleMixSplit>>>(
774778
add_count, to_add, intersectionsize, mixed_sets, false, false);

0 commit comments

Comments
 (0)