63 lines
824 B
Bash
Executable file
63 lines
824 B
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
echo C
|
|
gcc test.c -o test -O2 -march=native
|
|
hyperfine ./test
|
|
rm test
|
|
|
|
echo C++
|
|
g++ test.cpp -o test -O2 -march=native
|
|
hyperfine ./test
|
|
rm test
|
|
|
|
echo Python
|
|
python -m py_compile test.py
|
|
hyperfine "python test.py"
|
|
rm __pycache__ -r
|
|
|
|
echo Java
|
|
javac test.java
|
|
hyperfine "java test"
|
|
rm test.class
|
|
|
|
echo C#
|
|
mcs test.cs
|
|
hyperfine "mono test.exe"
|
|
rm test.exe
|
|
|
|
echo JavaScript
|
|
hyperfine "node test.js"
|
|
|
|
echo Perl
|
|
hyperfine "perl test.pl"
|
|
|
|
echo Ruby
|
|
hyperfine "ruby test.rb"
|
|
|
|
echo Go
|
|
go build test.go
|
|
hyperfine ./test
|
|
rm test
|
|
|
|
echo Rust
|
|
rustc test.rs -C opt-level=2 -C target-cpu=native
|
|
hyperfine ./test
|
|
rm test
|
|
|
|
echo Haskell
|
|
ghc -dynamic test.hs
|
|
hyperfine ./test
|
|
rm test test.o test.hi
|
|
|
|
echo Julia
|
|
hyperfine "julia test.jl"
|
|
|
|
echo R
|
|
hyperfine "Rscript test.r"
|
|
|
|
echo Lisp
|
|
hyperfine "ecl --shell test.lisp"
|
|
|
|
echo Lua
|
|
|