From 568903f1b7957ef03620ebad65d6ef68e031fef9 Mon Sep 17 00:00:00 2001 From: Sebastiano Vigna Date: Mon, 7 Oct 2024 14:54:14 +0200 Subject: [PATCH] Docs --- python/bench.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/python/bench.py b/python/bench.py index 6cdcbea..a3726c2 100755 --- a/python/bench.py +++ b/python/bench.py @@ -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, @@ -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 @@ -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 ") - 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]