From 4bcabfc885b0284e910d55b8a7cdf7d20a2ed593 Mon Sep 17 00:00:00 2001 From: Quentin Santos Date: Fri, 21 Jun 2024 19:05:09 +0200 Subject: [PATCH] Simplify code to generate benchmark input data --- bench | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bench b/bench index 03a0efc..165d677 100755 --- a/bench +++ b/bench @@ -4,11 +4,7 @@ cargo build --release repeat() { local count=$1 local file=$2 - local args8=($file $file $file $file $file $file $file $file) - local args64=("${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}") - for (( i = 0; i < $count; i++ )); do - cat "${args64[@]}" - done + yes "$file" | head -n $(( $count * 64 )) | xargs cat } echo "No-op" repeat 1000 4-unicode.txt | pv >/dev/null