#! /usr/bin/env perl # experiment 02: bunched vs unbunched version, time and performance do "../common.pl"; # test parameters $step = 4000; $ntries = 3; init_exp(); #output file $out_file = "./exp-02.csv"; open(CSV, ">", $out_file) or die "cannot open $out_file: $!"; #$unbunch = nhits / 1.4; $unbunch = 100000; $bunch = 1000; for($nhits = $step; $nhits < $max_nhits; $nhits += $step) { run_test("-b$unbunch"); $unbunched_time = $avg_time; $unbunched_perf = $perf; run_test("-b$bunch"); $bunched_time = $avg_time; $bunched_perf = $perf; $str = sprintf "%6d %6.3f %6.3f %6.3f %6.3f\n", $nhits, $unbunched_time, $bunched_time, $unbunched_perf, $bunched_perf; printf CSV "%s", $str; printf "%s", $str; } close CSV;