blob: fc5986fa25952752bec25561c9776c0cc7b8bca9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#!/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
hyperfine "lua test.lua"
|