forked from bddicken/languages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,65 @@ | ||
function run { | ||
if [ -f $2 ]; then | ||
if [ -f ${3} ]; then | ||
echo "" | ||
echo "Benchmarking $1" | ||
hyperfine -i --shell=none --runs 3 --warmup 2 "$2" | ||
input=`cat input.txt` | ||
hyperfine -i --shell=none --runs 3 --warmup 2 "${2} ${3} ${input}" | cut -c1-100 | ||
fi | ||
} | ||
|
||
run "Zig" "./zig/code 40" | ||
run "C" "./c/code 40" | ||
run "Rust" "./rust/target/release/code 40" | ||
run "Emojicode" "./emojicode/code 40" | ||
run "Dart" "./dart/code 40" | ||
run "Objective-C" "./objc/code 40" | ||
run "Kotlin JVM" "java -jar kotlin/code.jar 40" | ||
run "Kotlin Native" "./kotlin/code.kexe 40" | ||
run "Node" "node ./js/code.js 40" | ||
run "Bun" "bun ./js/code.js 40" | ||
run "Bun (Compiled)" "./js/bun 40" | ||
run "Deno" "deno ./js/code.js 40" | ||
run "PyPy" "pypy ./py/code.py 40" | ||
run "CPP" "./cpp/code 40" | ||
run "Go" "./go/code 40" | ||
run "Node (jitless)" "node --jitless ./js/code.js 40" | ||
run "Bun (jitless)" "bun ./js/code.js 40" "BUN_JSC_useJIT=0" | ||
run "Deno (jitless)" "deno --v8-flags=--jitless ./js/code.js 40" | ||
run "PyPy" "pypy ./py/code.py 40" | ||
run "Java" "java jvm.code 40" | ||
#run "Java GraalVM" "./jvm.code 40" | ||
run "Scala" "./scala/code 40" | ||
run "Ruby" "ruby ./ruby/code.rb 40" | ||
run "PHP JIT" "php -dopcache.enable_cli=1 -dopcache.jit=on -dopcache.jit_buffer_size=64M ./php/code.php 40" | ||
run "PHP" "php ./php/code.php 40" | ||
run "R" "Rscript ./r/code.R 40" | ||
run "Python" "python3.13 ./py/code.py 40" | ||
run "Common Lisp" "common-lisp/code 40" | ||
run "Inko" "./inko/code 40" | ||
run "Nim" "./nim/code 40" | ||
run "Free Pascal" "./fpc/code 40" | ||
run "Crystal" "./crystal/code 40" | ||
#run "Ada" "./ada/code 40" | ||
#run "D" "./d/code 40" # Seems to not have an arm / M1 version | ||
run "Odin" "./odin/code 40" | ||
run "Fortran" "./fortran/code 40" | ||
run "LuaJIT" "luajit ./lua/code 40" | ||
run "Lua" "lua ./lua/code.lua 40" | ||
run "Swift" "./swift/code 40" | ||
run "Julia" "julia ./julia/code.jl 40" | ||
#run "Haxe JVM" "java -jar haxe/code.jar 40" # was getting errors running `haxelib install hxjava` | ||
run "Elixir" "elixir elixir/bench.exs 40" | ||
#run "C# AOT" "./csharp/code-aot/code 40" | ||
run "C#" "./csharp/code/code 40" | ||
#run "F# AOT" "./fsharp/code-aot/code 40" | ||
run "F#" "./fsharp/code/code 40" | ||
run "Ruby" "ruby ./ruby/code.rb 40" | ||
run "Ruby YJIT" "miniruby --yjit ./ruby/code.rb 40" | ||
run "Haskell" "./hs/code 40" | ||
run "V" "./v/code 40" | ||
run "Chez Scheme" "chez --program ./chez/code.so 40" | ||
run "AWK" "awk -f ./awk/code.awk 40" | ||
run "MAWK" "mawk -f ./awk/code.awk 40" | ||
run "Clojure" "java -cp clojure/classes:$(clojure -Spath) code 40" | ||
run "Babashka" "bb -cp clojure -m code 40" | ||
run "COBOL" "./cobol/main" | ||
run "Zig" "" "./zig/code" | ||
run "C" "" "./c/code" | ||
run "Rust" "" "./rust/target/release/code" | ||
run "Emojicode" "" "./emojicode/code" | ||
run "Dart" "" "./dart/code" | ||
run "Objective-C" "" "./objc/code" | ||
run "Kotlin JVM" "java -jar" "kotlin/code.jar" | ||
run "Kotlin Native" "" "./kotlin/code.kexe" | ||
run "Node" "node" "./js/code.js" | ||
run "Bun" "bun" "./js/code.js" | ||
run "Bun (Compiled)" "" "./js/bun" | ||
run "Deno" "deno" "./js/code.js" | ||
run "PyPy" "pypy" "./py/code.py" | ||
run "CPP" "" "./cpp/code" | ||
run "Go" "" "./go/code" | ||
run "Node (jitless)" "node --jitless" "./js/code.js" | ||
run "Bun (jitless)" "bun" "./js/code.js" "BUN_JSC_useJIT=0" | ||
run "Deno (jitless)" "deno --v8-flags=--jitless" "./js/code.js" | ||
run "Java" "java" "jvm.code" | ||
run "Scala" "" "./scala/code" | ||
run "Ruby" "ruby" "./ruby/code.rb" | ||
run "PHP JIT" "php -dopcache.enable_cli=1 -dopcache.jit=on -dopcache.jit_buffer_size=64M" "./php/code.php" | ||
run "PHP" "php" "./php/code.php" | ||
run "R" "Rscript" "./r/code.R" | ||
run "Python" "python3.13" "./py/code.py" | ||
run "Common Lisp" "" "common-lisp/code" | ||
run "Inko" "" "./inko/code" | ||
run "Nim" "" "./nim/code" | ||
run "Free Pascal" "" "./fpc/code" | ||
run "Crystal" "" "./crystal/code" | ||
run "Odin" "" "./odin/code" | ||
run "Fortran" "" "./fortran/code" | ||
run "LuaJIT" "luajit" "./lua/code" | ||
run "Lua" "lua" "./lua/code.lua" | ||
run "Swift" "" "./swift/code" | ||
run "Julia" "julia" "./julia/code.jl" | ||
run "Elixir" "elixir" "elixir/bench.exs" | ||
run "C#" "" "./csharp/code/code" | ||
run "F#" "" "./fsharp/code/code" | ||
run "Ruby" "ruby" "./ruby/code.rb" | ||
run "Ruby YJIT" "miniruby --yjit" "./ruby/code.rb" | ||
run "Haskell" "" "./hs/code" | ||
run "V" "" "./v/code" | ||
run "Chez Scheme" "chez --program" "./chez/code.so" | ||
run "AWK" "awk -f" "./awk/code.awk" | ||
run "MAWK" "mawk -f" "./awk/code.awk" | ||
run "Clojure" "java -cp clojure/classes:$(clojure -Spath)" "./clojure/code" | ||
run "Babashka" "bb -cp clojure -m" "./babashka/code" | ||
run "COBOL" "" "./cobol/main" | ||
|
||
#run "F# AOT" "./fsharp/code-aot/code" | ||
#run "C# AOT" "./csharp/code-aot/code" | ||
#run "Haxe JVM" "java -jar haxe/code.jar" # was getting errors running `haxelib install hxjava` | ||
#run "Ada" "./ada/code" | ||
#run "D" "./d/code" # Seems to not have an arm / M1 version | ||
#run "Java GraalVM" "./jvm.code" |