All lru problem benchmarks

Current benchmark data was generated on Tue Dec 31 2024, 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.)

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 33ms 1.3ms 2.9MB 23ms 0ms zig 0.13.0
rust 0-unsafe.rs 34ms 1.7ms 1.9MB 23ms 0ms rustc 1.83.0
crystal 0-unsafe.cr 35ms 1.9ms 3.1MB 23ms 0ms crystal 1.14.0
rust 1.rs 46ms 4.3ms 2.0MB 33ms 0ms rustc 1.83.0
crystal 1.cr 62ms 2.8ms 3.1MB 50ms 0ms crystal 1.14.0
wasm 1.rs 81ms 1.3ms 19.2MB 70ms 0ms wasmtime 28.0.0
csharp 2.cs 89ms 3.0ms 15.9MB 80ms 0ms dotnet/aot 9.0.101
nim 2.nim 105ms 4.1ms 1.6MB 97ms 0ms nim/clang 2.2.0
nim 2.nim 108ms 2.2ms 1.8MB 100ms 0ms nim 2.2.0
d 1.d 115ms 1.1ms 5.9MB 100ms 10ms ldc2 1.40.0
go 3.go 121ms 2.6ms 0.3MB 113ms 0ms tinygo 0.35.0
go 3.go 122ms 1.2ms 3.4MB 110ms 0ms go 1.23.4
haxe 1.hx 127ms 0.8ms 5.0MB 120ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 128ms 3.0ms 20.4MB 113ms 3ms haxe/cpp 4.3.6
odin 1.odin 140ms 1.6ms 1.6MB 130ms 0ms odin 2024
csharp 2.cs 140ms 0.7ms 26.8MB 127ms 0ms mono 6.12.0
python 2.py 143ms 0.8ms 57.9MB 117ms 13ms pypy 3.10.14
haxe 1.hx 153ms 5.1ms 5.7MB 143ms 0ms haxe/hl/jit 1.14.0
dart 2.dart 160ms 5.4ms 9.3MB 153ms 0ms dart/exe 3.6.0
ocaml 1.ml 165ms 2.2ms 6.4MB 157ms 0ms ocaml 5.2.1
d 1.d 169ms 2.3ms 8.1MB 160ms 0ms dmd 2.109.1
kotlin 1-m.kt 172ms 3.8ms 94.9MB 283ms 30ms kotlin/jvm 21
python 1.py 172ms 3.1ms 59.5MB 147ms 10ms pypy 3.10.14
kotlin 2-m.kt 188ms 5.4ms 102.2MB 397ms 30ms kotlin/jvm 21
csharp 2.cs 243ms 1.1ms 33.6MB 230ms 10ms dotnet 9.0.101
v 1.v 246ms 1.6ms 2.1MB 237ms 0ms v/clang+gc 0.4.9
v 1.v 252ms 7.7ms 1.3MB 243ms 0ms v/clang 0.4.9
typescript 2.ts 254ms 5.4ms 64.3MB 240ms 13ms deno 2.1.4
kotlin 2.kt 285ms 1.3ms 7.8MB 413ms 3ms kotlin/native 1.8.21
javascript 2.js 293ms 0.8ms 66.6MB 287ms 7ms node 23.5.0
ruby 1.rb 317ms 3.7ms 13.6MB 300ms 3ms ruby/yjit 3.4.1
dart 1.dart 491ms 0.3ms 9.1MB 477ms 0ms dart/exe 3.6.0
kotlin 1.kt 501ms 15ms 7.8MB 600ms 7ms kotlin/native 1.8.21
ruby 1.rb 504ms 6.4ms 13.0MB 487ms 3ms ruby 3.4.1
javascript 1.js 525ms 5.8ms 64.9MB 510ms 7ms node 23.5.0
typescript 1.ts 533ms 1.8ms 65.4MB 510ms 17ms deno 2.1.4
javascript 2.js 601ms 2.1ms 122.1MB 653ms 43ms bun 1.1.42
ruby 1-m.rb 663ms 42ms 381.4MB 1143ms 123ms truffleruby 24.1.1
python 1.py 694ms 2.8ms 8.9MB 687ms 0ms pyston 3.8.12
javascript 1.js 777ms 12ms 106.0MB 837ms 80ms bun 1.1.42
python 2.py 790ms 4.9ms 8.5MB 773ms 0ms pyston 3.8.12
csharp 1.cs 1019ms 10ms 16.9MB 997ms 7ms dotnet/aot 9.0.101
python 1.py 1060ms 5.7ms 9.3MB 1043ms 0ms cpython 3.13.1
csharp 1.cs 1233ms 42ms 38.8MB 1220ms 10ms dotnet 9.0.101
python 2.py 1262ms 16ms 9.0MB 1247ms 0ms cpython 3.13.1
csharp 1.cs 3162ms 77ms 51.6MB 3123ms 30ms mono 6.12.0
nim 1.nim timeout 0.0ms 1.5MB 4990ms 0ms nim/clang 2.2.0
nim 1.nim timeout 0.0ms 1.3MB 4987ms 0ms nim 2.2.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 90ms 3.0ms 2.9MB 83ms 0ms zig 0.13.0
crystal 0-unsafe.cr 94ms 2.9ms 3.1MB 83ms 0ms crystal 1.14.0
rust 0-unsafe.rs 141ms 8.2ms 1.9MB 133ms 0ms rustc 1.83.0
rust 1.rs 170ms 7.7ms 2.0MB 157ms 0ms rustc 1.83.0
crystal 1.cr 173ms 1.9ms 3.1MB 163ms 0ms crystal 1.14.0
wasm 1.rs 224ms 8.0ms 19.1MB 207ms 0ms wasmtime 28.0.0
csharp 2.cs 255ms 3.9ms 13.6MB 240ms 0ms dotnet/aot 9.0.101
kotlin 2-m.kt 298ms 25ms 214.4MB 503ms 57ms kotlin/jvm 21
nim 2.nim 307ms 6.6ms 1.6MB 297ms 0ms nim/clang 2.2.0
kotlin 1.kt 308ms 0.6ms 204.7MB 413ms 40ms kotlin/jvm 21
nim 2.nim 319ms 3.0ms 1.4MB 310ms 0ms nim 2.2.0
python 2.py 321ms 7.8ms 58.9MB 293ms 10ms pypy 3.10.14
csharp 2.cs 338ms 3.1ms 22.7MB 327ms 0ms mono 6.12.0
d 1.d 348ms 14ms 6.1MB 330ms 43ms ldc2 1.40.0
python 1.py 360ms 5.5ms 60.4MB 337ms 10ms pypy 3.10.14
haxe 1.hx 361ms 10ms 25.6MB 347ms 3ms haxe/cpp 4.3.6
go 3.go 361ms 0.7ms 2.3MB 350ms 0ms tinygo 0.35.0
go 3.go 366ms 2.2ms 3.4MB 357ms 0ms go 1.23.4
haxe 1.hx 370ms 1.8ms 5.0MB 353ms 3ms haxe/hl/c 4.3.6
csharp 2.cs 390ms 13ms 33.4MB 363ms 13ms dotnet 9.0.101
odin 1.odin 408ms 6.4ms 1.6MB 397ms 0ms odin 2024
haxe 1.hx 436ms 4.8ms 5.7MB 420ms 3ms haxe/hl/jit 1.14.0
dart 2.dart 449ms 2.2ms 9.1MB 440ms 0ms dart/exe 3.6.0
ocaml 1.ml 496ms 9.3ms 6.6MB 483ms 0ms ocaml 5.2.1
d 1.d 505ms 9.6ms 7.8MB 487ms 20ms dmd 2.109.1
typescript 2.ts 696ms 42ms 73.5MB 687ms 17ms deno 2.1.4
v 1.v 730ms 2.4ms 2.1MB 720ms 0ms v/clang+gc 0.4.9
v 1.v 769ms 8.2ms 1.3MB 760ms 0ms v/clang 0.4.9
javascript 2.js 794ms 4.4ms 72.4MB 787ms 10ms node 23.5.0
ruby 1.rb 841ms 7.5ms 13.6MB 820ms 7ms ruby/yjit 3.4.1
kotlin 2.kt 863ms 8.2ms 7.6MB 1240ms 50ms kotlin/native 1.8.21
ruby 1-m.rb 1156ms 5.6ms 420.8MB 1593ms 157ms truffleruby 24.1.1
ruby 1.rb 1442ms 62ms 13.0MB 1423ms 7ms ruby 3.4.1
dart 1.dart 1444ms 9.7ms 9.1MB 1433ms 3ms dart/exe 3.6.0
kotlin 1.kt 1456ms 8.2ms 7.9MB 1763ms 17ms kotlin/native 1.8.21
javascript 1.js 1492ms 4.6ms 71.9MB 1477ms 10ms node 23.5.0
typescript 1.ts 1535ms 25ms 72.8MB 1520ms 10ms deno 2.1.4
javascript 2.js 1695ms 15ms 122.4MB 1797ms 83ms bun 1.1.42
python 1.py 2016ms 25ms 8.9MB 2000ms 0ms pyston 3.8.12
javascript 1.js 2217ms 20ms 109.6MB 2460ms 150ms bun 1.1.42
python 2.py 2346ms 34ms 8.5MB 2333ms 0ms pyston 3.8.12
csharp 1.cs 3020ms 20ms 17.1MB 2993ms 10ms dotnet/aot 9.0.101
python 1.py 3111ms 15ms 9.3MB 3093ms 3ms cpython 3.13.1
csharp 1.cs 3573ms 79ms 39.3MB 3550ms 27ms dotnet 9.0.101
python 2.py 3679ms 12ms 9.0MB 3667ms 0ms cpython 3.13.1
csharp 1.cs timeout 0.0ms 49.7MB 4940ms 50ms mono 6.12.0
nim 1.nim timeout 0.0ms 1.5MB 4990ms 0ms nim/clang 2.2.0
nim 1.nim timeout 0.0ms 1.3MB 4990ms 0ms nim 2.2.0

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 14ms 0.1ms 1.4MB 10ms 0ms zig 0.13.0
crystal 0-unsafe.cr 17ms 0.4ms 3.0MB 10ms 0ms crystal 1.14.0
rust 0-unsafe.rs 23ms 0.5ms 1.9MB 10ms 0ms rustc 1.83.0
rust 1.rs 28ms 1.9ms 1.9MB 17ms 0ms rustc 1.83.0
crystal 1.cr 28ms 0.6ms 3.0MB 20ms 0ms crystal 1.14.0
wasm 1.rs 44ms 1.6ms 19.1MB 33ms 0ms wasmtime 28.0.0
nim 2.nim 46ms 1.6ms 1.8MB 40ms 0ms nim/clang 2.2.0
nim 2.nim 49ms 1.9ms 1.5MB 40ms 0ms nim 2.2.0
csharp 2.cs 49ms 0.9ms 15.8MB 30ms 0ms dotnet/aot 9.0.101
d 1.d 50ms 1.2ms 4.0MB 43ms 0ms ldc2 1.40.0
go 3.go 61ms 0.9ms 0.1MB 50ms 0ms tinygo 0.35.0
haxe 1.hx 61ms 0.9ms 12.4MB 47ms 0ms haxe/cpp 4.3.6
odin 1.odin 64ms 1.7ms 1.6MB 53ms 0ms odin 2024
haxe 1.hx 65ms 2.0ms 5.0MB 57ms 0ms haxe/hl/c 4.3.6
go 3.go 66ms 2.1ms 5.5MB 60ms 0ms go 1.23.4
dart 2.dart 71ms 0.4ms 9.0MB 57ms 0ms dart/exe 3.6.0
ocaml 1.ml 73ms 2.1ms 5.9MB 60ms 0ms ocaml 5.2.1
haxe 1.hx 77ms 1.0ms 5.7MB 67ms 0ms haxe/hl/jit 1.14.0
d 1.d 78ms 2.3ms 8.1MB 67ms 3ms dmd 2.109.1
v 1.v 85ms 1.3ms 1.3MB 73ms 0ms v/clang 0.4.9
csharp 2.cs 88ms 2.2ms 24.7MB 70ms 0ms mono 6.12.0
v 1.v 97ms 1.5ms 2.1MB 87ms 0ms v/clang+gc 0.4.9
python 2.py 101ms 2.0ms 57.8MB 77ms 10ms pypy 3.10.14
dart 1.dart 107ms 0.5ms 9.1MB 97ms 0ms dart/exe 3.6.0
python 1.py 115ms 1.3ms 58.5MB 90ms 10ms pypy 3.10.14
kotlin 1-m.kt 132ms 1.5ms 92.4MB 250ms 20ms kotlin/jvm 21
kotlin 2.kt 134ms 3.9ms 5.7MB 190ms 0ms kotlin/native 1.8.21
typescript 2.ts 139ms 1.4ms 60.6MB 130ms 10ms deno 2.1.4
javascript 1.js 150ms 0.6ms 62.0MB 137ms 3ms node 23.5.0
javascript 2.js 156ms 3.5ms 60.9MB 150ms 7ms node 23.5.0
typescript 1.ts 157ms 0.6ms 62.6MB 147ms 7ms deno 2.1.4
kotlin 2-m.kt 159ms 9.9ms 90.8MB 307ms 27ms kotlin/jvm 21
csharp 2.cs 159ms 4.8ms 33.6MB 133ms 7ms dotnet 9.0.101
kotlin 1.kt 162ms 4.0ms 5.8MB 207ms 0ms kotlin/native 1.8.21
ruby 1.rb 181ms 1.5ms 13.6MB 163ms 3ms ruby/yjit 3.4.1
ruby 1.rb 277ms 2.6ms 12.9MB 263ms 0ms ruby 3.4.1
javascript 1.js 298ms 3.3ms 113.8MB 330ms 67ms bun 1.1.42
javascript 2.js 327ms 2.1ms 125.6MB 343ms 50ms bun 1.1.42
python 1.py 328ms 7.8ms 8.5MB 313ms 0ms pyston 3.8.12
python 2.py 366ms 15ms 8.1MB 350ms 0ms pyston 3.8.12
nim 1.nim 463ms 5.7ms 1.5MB 450ms 0ms nim/clang 2.2.0
nim 1.nim 467ms 5.4ms 1.3MB 453ms 0ms nim 2.2.0
ruby 1-m.rb 486ms 24ms 373.9MB 930ms 130ms truffleruby 24.1.1
python 1.py 503ms 5.9ms 9.1MB 483ms 0ms cpython 3.13.1
python 2.py 613ms 10ms 8.8MB 600ms 0ms cpython 3.13.1
csharp 1.cs 1533ms 8.5ms 38.8MB 1517ms 13ms dotnet 9.0.101
csharp 1.cs 1716ms 16ms 28.6MB 1703ms 0ms mono 6.12.0
csharp 1.cs 1729ms 2.9ms 16.9MB 1707ms 3ms dotnet/aot 9.0.101