bench-sizes 414 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. measure() {
  3. ls -lh "$@" | awk '{ print $5, $9 }'
  4. }
  5. # Compile
  6. for f in ./*.lua; do
  7. ../src/luac -o "${f%.lua}.byte" "$f"
  8. done
  9. if ! test -f empty_aot.so; then
  10. ../src/luaot empty.lua -o empty_aot.c
  11. ../scripts/compile empty_aot.c
  12. fi
  13. echo "==== LUA SOURCE ===="
  14. measure -- *.lua
  15. echo
  16. echo "==== LUA BYTECODE ===="
  17. measure -- *.byte
  18. echo
  19. echo "==== AOT COMPILED ===="
  20. measure -- *_aot.so