lama_byterun/byterun/performance_check.sh

41 lines
825 B
Bash
Raw Normal View History

2024-11-09 23:32:09 +03:00
#!/usr/bin/env bash
2025-06-09 17:08:41 +03:00
xmake build
cp "build/linux/x86_64/release/byterun" byterun.exe
# dune build > /dev/null
2024-11-09 23:32:09 +03:00
2025-01-11 23:51:50 +03:00
compiler=../_build/default/src/Driver.exe
2024-11-09 23:32:09 +03:00
2025-01-11 23:51:50 +03:00
echo "Used compiler path:"
echo $compiler
# echo "Interpreter:"
# time echo '0' | $compiler -i ../performance/Sort.lama
2024-11-09 23:32:09 +03:00
2025-01-11 23:51:50 +03:00
echo "Stack Machine:"
time echo '0' | $compiler -s ../performance/Sort.lama > /dev/null
2024-11-09 23:32:09 +03:00
2025-01-11 23:51:50 +03:00
$compiler -b ../performance/Sort.lama
2024-11-09 23:32:09 +03:00
# ./byterun.exe -p Sort.bc
2025-01-11 23:51:50 +03:00
# echo "Old Byterun:"
# time ./old_byterun.exe -i Sort.bc > /dev/null
echo "Code:"
time ./byterun.exe -p Sort.bc > /dev/null
2024-11-09 23:32:09 +03:00
echo "Byterun:"
time ./byterun.exe -vi Sort.bc > /dev/null
2024-11-09 23:32:09 +03:00
# # NOTE: is not possible for now
# echo "Byterun (verefication only):"
# time ./byterun.exe -v Sort.bc > /dev/null
2024-12-15 16:19:54 +03:00
echo "Byterun (run only):"
time ./byterun.exe -i Sort.bc > /dev/null
2024-11-09 23:32:09 +03:00
rm Sort.*
2024-12-15 16:19:54 +03:00
rm *.o