2023-12-19 10:55:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
dir="${BASH_SOURCE%/*}";
|
|
|
|
|
2023-12-19 17:00:13 +00:00
|
|
|
for program in "aes-32bit" "aes-tboxes" "aes-intrinsic"
|
2023-12-19 10:55:05 +00:00
|
|
|
do
|
|
|
|
for flags in "-g" ""
|
|
|
|
do
|
|
|
|
if [ -z "$flags" ]
|
|
|
|
then
|
|
|
|
mode="performance";
|
|
|
|
else
|
|
|
|
mode="debug";
|
|
|
|
export CPPFLAGS="$flags";
|
|
|
|
fi;
|
|
|
|
|
|
|
|
for iterations in "1000000" "10000000"
|
|
|
|
do
|
|
|
|
echo "$program ($iterations iterations, $mode mode)";
|
|
|
|
root="$dir/$program";
|
|
|
|
make -C "$root" clean > /dev/null 2>&1;
|
|
|
|
make -C "$root" > /dev/null 2>&1;
|
|
|
|
"$dir/$program/bin/aes" "$iterations";
|
2023-12-19 17:18:13 +00:00
|
|
|
echo "";
|
2023-12-19 10:55:05 +00:00
|
|
|
unset CPPFLAGS;
|
|
|
|
done;
|
|
|
|
done;
|
|
|
|
done;
|