zongors-reality-engine/test/bench/run.sh

38 lines
703 B
Bash
Executable File

#!/bin/sh
# Exit on error
set -e
# Check if a filename was provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <filename_without_extension>"
exit 1
fi
FILENAME=$1
# Function to print section headers
print_section() {
printf '\n\e[1;34m%s\e[0m\n' "$1"
}
# Wren Implementation
print_section "Wren ($FILENAME.wren)"
time wren "$FILENAME.wren"
# Lua Implementation
print_section "Lua ($FILENAME.lua)"
time lua "$FILENAME.lua"
# Perl Implementation
print_section "Perl ($FILENAME.pl)"
time perl "$FILENAME.pl"
# Python Implementation
print_section "Python ($FILENAME.py)"
time python3 "$FILENAME.py"
# ZRE Implementation
print_section "zre ($FILENAME.zre)"
time ../../src/zre "$FILENAME.zre"