Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vigna committed Oct 7, 2024
1 parent cd26fc2 commit 568903f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions python/bench.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python3

import subprocess
import sys
from tqdm import tqdm
from itertools import product
import os

# Bit lengths to try

lens = [1_000_000,
4_000_000,
16_000_000,
Expand All @@ -12,10 +16,16 @@
1_024_000_000,
]

# Densities

densities = [0.1, 0.5, 0.9]

# Number of experiments

repeats = 7

# Number of tested positions

num_pos = 70_000_000


Expand All @@ -33,8 +43,10 @@ def run_bench(binary_name, bench_name, uniform=True):
choices = ["rank", "select", "select_non_uniform"]

if len(sys.argv) < 2:
print("Usage: python3 bench-scripts.py <choice>")
print("Choices: rank, select, select_non_uniform")
print("Usage: bench.py [rank|select|select_non_uniform]")
print()
print("Run the specified benchmarks and saves CSV files in bench-results")
print("Please compile the benchmarks with \"make ranksel\" first")
sys.exit(1)

choice = sys.argv[1]
Expand Down

0 comments on commit 568903f

Please sign in to comment.