All binarytrees problem benchmarks

Current benchmark data was generated on Fri Aug 01 2025, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2.java 460ms 9.2ms 574.1MB 553ms 83ms openjdk 21
java 2.java 470ms 8.8ms 624.4MB 577ms 97ms openjdk 23
java 2-m.java 480ms 9.9ms 640.7MB 680ms 110ms graal/jvm 17.0.8
kotlin 1.kt 500ms 16ms 578.4MB 597ms 97ms kotlin/jvm 21
nim 2.nim 685ms 7.3ms 36.3MB 667ms 7ms nim 2.2.4
dart 1.dart 711ms 6.5ms 80.9MB 683ms 37ms dart/exe 3.8.2
v 1.v 784ms 5.2ms 22.1MB 770ms 0ms v/clang+gc 0.4.11
javascript 1-m.js 924ms 19ms 173.9MB 1400ms 193ms bun 1.2.19
csharp 1.cs 940ms 5.4ms 167.7MB 933ms 127ms dotnet/aot 9.0.303
csharp 1.cs 952ms 25ms 200.7MB 960ms 150ms dotnet 9.0.303
nim 2.nim 978ms 54ms 35.2MB 957ms 3ms nim/clang 2.2.4
typescript 1.ts 1040ms 7.5ms 395.3MB 1000ms 193ms deno 2.4.3
javascript 1.js 1057ms 11ms 455.9MB 973ms 230ms node 24.4.1
python 1.py 1165ms 6.5ms 96.8MB 1107ms 47ms pypy 3.11.13
java 2.java 1176ms 13ms 1047.1MB 593ms 757ms openjdk/zgc 21
crystal 1.cr 1231ms 8.3ms 64.2MB 1203ms 10ms crystal 1.17.0
rust 4.rs 1259ms 3.4ms 33.8MB 1240ms 7ms rustc 1.88.0
haxe 1.hx 1290ms 13ms 144.0MB 1470ms 67ms haxe/cpp 4.3.6
rust 5.rs 1337ms 1.1ms 33.8MB 1317ms 10ms rustc 1.88.0
rust 3.rs 1443ms 32ms 49.8MB 1410ms 13ms rustc 1.88.0
ruby 1-m.rb 1486ms 2574ms 801.2MB 6400ms 613ms truffleruby 24.2.2
csharp 1.cs 1675ms 21ms 101.3MB 1873ms 200ms mono 6.12.0
go 1.go 1726ms 16ms 51.9MB 1707ms 10ms tinygo 0.38.0
zig 1.zig 1735ms 12ms 49.0MB 1707ms 13ms zig 0.14.1
wasm 5.rs 1754ms 5.6ms 33.8MB 1733ms 10ms wasmtime 35.0.0
wasm 3.rs 1818ms 28ms 49.8MB 1783ms 20ms wasmtime 35.0.0
wasm 4.rs 1833ms 6.3ms 33.7MB 1813ms 7ms wasmtime 35.0.0
chapel 4.chpl 1943ms 3.5ms 62.3MB 1937ms 0ms chpl 1.31.0
chapel 3.chpl 2057ms 34ms 62.4MB 2050ms 0ms chpl 1.31.0
d 1.d 2187ms 1.9ms 312.5MB 2160ms 33ms ldc2 1.41.0
v 1.v 2201ms 13ms 2086.6MB 1303ms 883ms v/clang 0.4.11
odin 1.odin 2343ms 15ms 49.5MB 2313ms 17ms odin 2024
go 1-m.go 2343ms 11ms 41.9MB 5213ms 33ms go 1.24.5
swift 1.swift 2661ms 31ms 53.6MB 2630ms 17ms swift 6.1.2
d 1.d 3000ms 18ms 314.1MB 3163ms 50ms dmd 2.111.0
ocaml 1.ml 3020ms 42ms 157.0MB 2927ms 77ms ocaml 5.3.0
lua 1.lua 3513ms 23ms 173.0MB 3370ms 130ms luajit 2.1.0-beta3
kotlin 1.kt 3911ms 6.4ms 143.8MB 4087ms 70ms kotlin/native 2.1.20
haxe 2.hx 4336ms 13ms 495.3MB 4867ms 253ms haxe/cpp 4.3.6
ruby 1.rb 4961ms 19ms 109.4MB 4863ms 83ms ruby/yjit 3.4.5
acton 1.act timeout 0.0ms 67.2MB 5870ms 87ms actonc 0.26.0
haxe 1.hx timeout 0.0ms 48.6MB 5457ms 423ms haxe/hl/c 4.3.6
haxe 2.hx timeout 0.0ms 83.0MB 5003ms 683ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 51.1MB 7750ms 430ms haxe/hl/jit 1.16.0
haxe 2.hx timeout 0.0ms 131.0MB 7297ms 770ms haxe/hl/jit 1.16.0
lua 1.lua timeout 0.0ms 105.0MB 4950ms 37ms lua 5.4.7
perl 1.pl timeout 0.0ms 77.8MB 4960ms 23ms perl 5.40.2
php 1.php timeout 0.0ms 141.5MB 4970ms 20ms php 8.2.29
python 1.py timeout 0.0ms 41.0MB 4967ms 23ms cpython 3.13.5
python 1.py timeout 0.0ms 40.5MB 4733ms 253ms pyston 3.8.12
ruby 1.rb timeout 0.0ms 70.0MB 4943ms 43ms ruby 3.4.5

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
nim 2.nim 64ms 2.2ms 6.9MB 53ms 0ms nim 2.2.4
v 1.v 70ms 1.3ms 4.6MB 60ms 0ms v/clang+gc 0.4.11
dart 1.dart 75ms 0.6ms 43.0MB 53ms 13ms dart/exe 3.8.2
haxe 1.hx 88ms 0.4ms 25.6MB 77ms 10ms haxe/cpp 4.3.6
nim 2.nim 93ms 1.9ms 5.8MB 80ms 0ms nim/clang 2.2.4
python 1.py 95ms 3.5ms 68.3MB 63ms 17ms pypy 3.11.13
javascript 1.js 99ms 1.4ms 76.3MB 80ms 23ms bun 1.2.19
crystal 1.cr 104ms 1.6ms 11.0MB 90ms 0ms crystal 1.17.0
csharp 1.cs 115ms 10ms 38.9MB 80ms 27ms dotnet/aot 9.0.303
java 2.java 120ms 4.9ms 168.1MB 150ms 30ms openjdk 21
rust 4.rs 121ms 2.1ms 5.8MB 110ms 0ms rustc 1.88.0
kotlin 1.kt 122ms 1.1ms 159.5MB 143ms 37ms kotlin/jvm 21
java 2-m.java 123ms 0.5ms 97.0MB 173ms 23ms openjdk 23
rust 5.rs 126ms 2.0ms 5.8MB 120ms 0ms rustc 1.88.0
typescript 1.ts 128ms 1.0ms 80.8MB 127ms 30ms deno 2.4.3
javascript 1.js 128ms 0.9ms 81.6MB 127ms 23ms node 24.4.1
rust 3.rs 138ms 4.5ms 7.8MB 127ms 0ms rustc 1.88.0
csharp 1.cs 143ms 2.1ms 42.1MB 120ms 13ms mono 6.12.0
java 2-m.java 144ms 3.8ms 224.3MB 210ms 57ms graal/jvm 17.0.8
zig 1.zig 150ms 1.6ms 7.0MB 140ms 0ms zig 0.14.1
go 1.go 152ms 0.5ms 5.0MB 140ms 0ms tinygo 0.38.0
wasm 5.rs 171ms 2.9ms 19.8MB 160ms 0ms wasmtime 35.0.0
wasm 4.rs 174ms 0.5ms 19.8MB 160ms 0ms wasmtime 35.0.0
wasm 3.rs 181ms 14ms 21.8MB 167ms 0ms wasmtime 35.0.0
chapel 4.chpl 185ms 1.5ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 2.4ms 32.3MB 187ms 0ms chpl 1.31.0
csharp 1.cs 198ms 7.5ms 50.1MB 157ms 30ms dotnet 9.0.303
kotlin 1.kt 203ms 6.2ms 17.3MB 210ms 3ms kotlin/native 2.1.20
d 1.d 205ms 3.2ms 207.9MB 180ms 13ms ldc2 1.41.0
go 1-m.go 207ms 1.7ms 8.3MB 367ms 7ms go 1.24.5
v 1.v 210ms 1.6ms 196.5MB 113ms 83ms v/clang 0.4.11
odin 1.odin 219ms 4.2ms 7.5MB 207ms 0ms odin 2024
ocaml 1.ml 223ms 9.3ms 19.2MB 207ms 3ms ocaml 5.3.0
swift 1.swift 242ms 3.3ms 11.9MB 230ms 0ms swift 6.1.2
d 1.d 262ms 1.9ms 209.7MB 237ms 10ms dmd 2.111.0
lua 1.lua 290ms 1.7ms 15.9MB 270ms 7ms luajit 2.1.0-beta3
java 2.java 304ms 3.3ms 241.5MB 163ms 190ms openjdk/zgc 21
haxe 2.hx 380ms 5.8ms 58.3MB 410ms 20ms haxe/cpp 4.3.6
python 1.py 492ms 6.9ms 11.9MB 470ms 10ms pyston 3.8.12
ruby 1.rb 504ms 1.1ms 20.3MB 480ms 10ms ruby/yjit 3.4.5
ruby 1-m.rb 528ms 58ms 407.2MB 1043ms 157ms truffleruby 24.2.2
php 1.php 618ms 4.3ms 62.6MB 587ms 17ms php 8.2.29
haxe 1.hx 640ms 2.4ms 8.7MB 613ms 43ms haxe/hl/c 4.3.6
haxe 1.hx 671ms 4.4ms 11.4MB 727ms 57ms haxe/hl/jit 1.16.0
python 1.py 734ms 16ms 12.9MB 723ms 0ms cpython 3.13.5
lua 1.lua 817ms 0.3ms 17.0MB 800ms 0ms lua 5.4.7
acton 1.act 826ms 31ms 12.1MB 957ms 60ms actonc 0.26.0
haxe 2.hx 930ms 3.9ms 13.6MB 817ms 157ms haxe/hl/c 4.3.6
ruby 1.rb 932ms 5.8ms 19.5MB 913ms 7ms ruby 3.4.5
haxe 2.hx 940ms 11ms 25.0MB 910ms 170ms haxe/hl/jit 1.16.0
perl 1.pl 1828ms 6.1ms 14.4MB 1813ms 0ms perl 5.40.2