All lru problem benchmarks

Current benchmark data was generated on Sat Jan 28 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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 45ms 1.7ms 2.8MB 37ms 0ms zig 0.11.0-dev.1479+97b1a9bb6
crystal 0-unsafe.cr 55ms 0.2ms 3.0MB 47ms 0ms crystal 1.7.2
rust 0-unsafe.rs 62ms 3.5ms 1.0MB 50ms 0ms rustc 1.67.0
rust 1.rs 70ms 0.1ms 1.0MB 60ms 0ms rustc 1.67.0
crystal 1.cr 97ms 1.2ms 3.0MB 87ms 0ms crystal 1.7.2
csharp 2.cs 138ms 3.9ms 10.2MB 133ms 0ms dotnet/aot 7.0.102
nim 2.nim 147ms 1.5ms 1.2MB 140ms 0ms nim/clang 1.6.10
nim 2.nim 151ms 0.4ms 1.0MB 140ms 0ms nim 1.6.10
wasm 1.rs 162ms 3.5ms 15.8MB 150ms 0ms wasmedgec 0.11.2
go 3.go 167ms 3.1ms 2.0MB 160ms 0ms tinygo 0.25.0
go 3.go 174ms 2.3ms 3.4MB 163ms 0ms go 1.19.5
d 1.d 177ms 2.8ms 3.7MB 170ms 0ms ldc2 1.30.0
haxe 1.hx 184ms 2.9ms 22.4MB 167ms 3ms haxe/cpp 4.2.5
csharp 2.cs 186ms 3.9ms 25.1MB 173ms 0ms mono 6.12.0
haxe 1.hx 195ms 1.3ms 2.8MB 183ms 0ms haxe/hl/c 4.2.5
wasm 1.rs 206ms 1.2ms 11.1MB 193ms 0ms wasmtime 5.0.0
python 2.py 212ms 19ms 77.3MB 177ms 13ms pypy 3.9.16
csharp 2.cs 218ms 8.5ms 101.9MB 177ms 13ms dotnet 7.0.102
kotlin 2-m.kt 221ms 5.0ms 113.5MB 323ms 27ms kotlin/jvm 17.0.2
haxe 1.hx 237ms 2.6ms 3.7MB 223ms 0ms haxe/hl/jit 1.13.0
kotlin 1.kt 240ms 5.8ms 109.4MB 290ms 17ms kotlin/jvm 17.0.2
python 1.py 248ms 4.0ms 78.2MB 207ms 23ms pypy 3.9.16
dart 2.dart 251ms 2.9ms 15.0MB 237ms 0ms dart/exe 2.19.0
d 1.d 253ms 1.6ms 4.9MB 240ms 0ms dmd 2.101.2
ocaml 1.ml 259ms 0.2ms 6.8MB 250ms 0ms ocaml 5.0.0
odin 1.odin 275ms 3.5ms 1.3MB 263ms 0ms odin 2023
wasm 1.rs 279ms 8.7ms 44.5MB 283ms 10ms node 16.19.0
typescript 2.ts 364ms 2.2ms 43.5MB 357ms 10ms deno 1.30.0
javascript 2.js 376ms 2.0ms 54.6MB 363ms 3ms node 19.5.0
v 1.v 403ms 1.5ms 2.2MB 390ms 0ms v/clang+gc 0.3.2
v 1.v 424ms 0.3ms 2.2MB 410ms 0ms v/clang 0.3.2
kotlin 2-m.kt 442ms 3.8ms 42.5MB 727ms 13ms kotlin/native 1.8.0
ruby 1.rb 448ms 2.7ms 33.0MB 420ms 13ms ruby/yjit 3.2.0
javascript 1.js 558ms 5.7ms 142.4MB 547ms 30ms bun 0.5.1
ruby 1.rb 602ms 5.0ms 32.3MB 580ms 3ms ruby 3.2.0
typescript 1.ts 770ms 0.8ms 43.9MB 760ms 3ms deno 1.30.0
javascript 2.js 792ms 5.3ms 109.3MB 800ms 13ms bun 0.5.1
ruby 1-m.rb 832ms 33ms 335.1MB 1183ms 100ms truffleruby 22.3.1
python 1.py 976ms 2.0ms 9.0MB 960ms 0ms pyston 3.8.12
javascript 1.js 1034ms 5.1ms 61.8MB 1013ms 10ms node 19.5.0
python 2.py 1156ms 1.7ms 8.7MB 1140ms 0ms pyston 3.8.12
csharp 1.cs 1296ms 5.7ms 75.3MB 1273ms 17ms dotnet/aot 7.0.102
python 1.py 1300ms 7.9ms 9.3MB 1287ms 0ms cpython 3.11.1
dart 1.dart 1462ms 3.8ms 14.4MB 1447ms 0ms dart/exe 2.19.0
python 2.py 1494ms 5.2ms 9.1MB 1477ms 0ms cpython 3.11.1
csharp 1.cs 1692ms 20ms 163.6MB 1627ms 47ms dotnet 7.0.102
csharp 1.cs 3054ms 61ms 49.6MB 3017ms 30ms mono 6.12.0
kotlin 1.kt timeout 0.0ms 15.0MB 4993ms 10ms kotlin/native 1.8.0
nim 1.nim timeout 0.0ms 1.3MB 4987ms 0ms nim/clang 1.6.10
nim 1.nim timeout 0.0ms 1.0MB 4990ms 0ms nim 1.6.10

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 128ms 0.5ms 2.7MB 120ms 0ms zig 0.11.0-dev.1479+97b1a9bb6
crystal 0-unsafe.cr 160ms 1.7ms 2.9MB 147ms 0ms crystal 1.7.2
rust 0-unsafe.rs 223ms 4.9ms 1.1MB 210ms 0ms rustc 1.67.0
crystal 1.cr 281ms 0.7ms 2.9MB 270ms 0ms crystal 1.7.2
rust 1.rs 292ms 0.1ms 1.1MB 280ms 0ms rustc 1.67.0
kotlin 2.kt 365ms 4.2ms 132.5MB 460ms 33ms kotlin/jvm 17.0.2
csharp 2.cs 394ms 2.8ms 10.0MB 390ms 0ms dotnet/aot 7.0.102
nim 2.nim 430ms 1.7ms 1.2MB 420ms 0ms nim/clang 1.6.10
csharp 2.cs 432ms 5.9ms 100.1MB 390ms 23ms dotnet 7.0.102
nim 2.nim 448ms 1.1ms 1.0MB 437ms 0ms nim 1.6.10
kotlin 1.kt 458ms 3.2ms 132.6MB 507ms 23ms kotlin/jvm 17.0.2
wasm 1.rs 461ms 0.7ms 15.6MB 450ms 0ms wasmedgec 0.11.2
python 2.py 475ms 2.8ms 77.2MB 443ms 10ms pypy 3.9.16
go 3.go 494ms 6.0ms 0.3MB 483ms 0ms tinygo 0.25.0
csharp 2.cs 502ms 1.9ms 24.2MB 487ms 0ms mono 6.12.0
python 1.py 512ms 11ms 78.8MB 480ms 17ms pypy 3.9.16
go 3.go 518ms 5.6ms 3.4MB 503ms 0ms go 1.19.5
d 1.d 520ms 1.8ms 5.7MB 510ms 0ms ldc2 1.30.0
haxe 1.hx 524ms 6.4ms 27.5MB 513ms 3ms haxe/cpp 4.2.5
haxe 1.hx 577ms 10ms 2.9MB 563ms 0ms haxe/hl/c 4.2.5
wasm 1.rs 601ms 1.2ms 11.1MB 585ms 0ms wasmtime 5.0.0
wasm 1.rs 649ms 8.1ms 44.5MB 657ms 3ms node 16.19.0
haxe 1.hx 692ms 1.0ms 3.7MB 680ms 0ms haxe/hl/jit 1.13.0
dart 2.dart 743ms 14ms 14.3MB 723ms 3ms dart/exe 2.19.0
d 1.d 748ms 2.3ms 4.9MB 737ms 0ms dmd 2.101.2
ocaml 1.ml 769ms 4.3ms 6.8MB 757ms 0ms ocaml 5.0.0
odin 1.odin 820ms 9.6ms 1.2MB 807ms 0ms odin 2023
typescript 2.ts 999ms 4.7ms 45.3MB 990ms 10ms deno 1.30.0
javascript 2.js 1014ms 6.1ms 61.5MB 990ms 17ms node 19.5.0
ruby 1.rb 1183ms 7.0ms 33.0MB 1157ms 10ms ruby/yjit 3.2.0
v 1.v 1205ms 2.4ms 2.3MB 1193ms 0ms v/clang+gc 0.3.2
v 1.v 1265ms 1.6ms 2.3MB 1257ms 0ms v/clang 0.3.2
kotlin 2-m.kt 1377ms 6.7ms 145.0MB 2233ms 87ms kotlin/native 1.8.0
ruby 1.rb 1478ms 87ms 370.8MB 1977ms 150ms truffleruby 22.3.1
javascript 1.js 1587ms 8.0ms 164.9MB 1607ms 23ms bun 0.5.1
ruby 1.rb 1648ms 12ms 32.4MB 1620ms 10ms ruby 3.2.0
typescript 1.ts 2233ms 2.2ms 45.3MB 2217ms 10ms deno 1.30.0
javascript 2.js 2293ms 13ms 120.6MB 2303ms 10ms bun 0.5.1
python 1.py 2900ms 12ms 9.0MB 2880ms 3ms pyston 3.8.12
javascript 1.js 2965ms 7.7ms 62.1MB 2940ms 17ms node 19.5.0
python 2.py 3456ms 28ms 8.8MB 3440ms 0ms pyston 3.8.12
csharp 1.cs 3809ms 8.4ms 73.7MB 3783ms 20ms dotnet/aot 7.0.102
python 1.py 3892ms 45ms 9.5MB 3877ms 0ms cpython 3.11.1
dart 1.dart 4365ms 5.6ms 16.5MB 4343ms 0ms dart/exe 2.19.0
python 2.py 4470ms 72ms 9.1MB 4453ms 0ms cpython 3.11.1
csharp 1.cs 4680ms 14ms 159.6MB 4607ms 57ms dotnet 7.0.102
csharp 1.cs timeout 0.0ms 47.9MB 4937ms 50ms mono 6.12.0
kotlin 1.kt timeout 0.0ms 15.0MB 4997ms 0ms kotlin/native 1.8.0
nim 1.nim timeout 0.0ms 1.3MB 4983ms 0ms nim/clang 1.6.10
nim 1.nim timeout 0.0ms 1.0MB 4990ms 0ms nim 1.6.10

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 21ms 0.6ms 1.0MB 10ms 0ms zig 0.11.0-dev.1479+97b1a9bb6
crystal 0-unsafe.cr 27ms 0.8ms 2.9MB 20ms 0ms crystal 1.7.2
rust 0-unsafe.rs 35ms 1.7ms 1.0MB 30ms 0ms rustc 1.67.0
rust 1.rs 47ms 0.2ms 1.0MB 40ms 0ms rustc 1.67.0
crystal 1.cr 49ms 0.6ms 3.0MB 40ms 0ms crystal 1.7.2
nim 2.nim 63ms 0.2ms 1.3MB 50ms 0ms nim/clang 1.6.10
nim 2.nim 65ms 0.7ms 1.1MB 57ms 0ms nim 1.6.10
csharp 2.cs 71ms 1.2ms 8.3MB 67ms 0ms dotnet/aot 7.0.102
d 1.d 75ms 0.7ms 3.6MB 63ms 0ms ldc2 1.30.0
wasm 1.rs 82ms 1.2ms 14.7MB 70ms 0ms wasmedgec 0.11.2
go 3.go 83ms 2.9ms 0.0MB 70ms 0ms tinygo 0.25.0
haxe 1.hx 85ms 0.3ms 14.1MB 67ms 3ms haxe/cpp 4.2.5
go 3.go 94ms 2.2ms 3.9MB 80ms 0ms go 1.19.5
haxe 1.hx 97ms 3.5ms 2.9MB 83ms 0ms haxe/hl/c 4.2.5
wasm 1.rs 105ms 0.5ms 9.2MB 90ms 0ms wasmtime 5.0.0
csharp 2.cs 107ms 2.0ms 25.6MB 93ms 0ms mono 6.12.0
odin 1.odin 112ms 0.5ms 1.2MB 100ms 0ms odin 2023
d 1.d 112ms 2.5ms 4.7MB 103ms 0ms dmd 2.101.2
ocaml 1.ml 115ms 0.5ms 5.9MB 107ms 0ms ocaml 5.0.0
dart 2.dart 118ms 2.0ms 15.0MB 100ms 0ms dart/exe 2.19.0
haxe 1.hx 119ms 2.9ms 3.7MB 110ms 0ms haxe/hl/jit 1.13.0
v 1.v 134ms 1.0ms 2.3MB 123ms 0ms v/clang+gc 0.3.2
v 1.v 140ms 0.3ms 2.3MB 130ms 0ms v/clang 0.3.2
python 2.py 141ms 3.5ms 77.2MB 110ms 17ms pypy 3.9.16
csharp 2.cs 150ms 3.1ms 104.0MB 100ms 20ms dotnet 7.0.102
python 1.py 171ms 15ms 78.2MB 140ms 13ms pypy 3.9.16
kotlin 1.kt 172ms 3.4ms 75.8MB 243ms 10ms kotlin/jvm 17.0.2
wasm 1.rs 180ms 3.4ms 44.6MB 190ms 3ms node 16.19.0
typescript 2.ts 186ms 0.6ms 39.3MB 177ms 7ms deno 1.30.0
kotlin 2.kt 186ms 6.0ms 78.6MB 250ms 27ms kotlin/jvm 17.0.2
javascript 2.js 203ms 3.7ms 49.1MB 193ms 3ms node 19.5.0
typescript 1.ts 213ms 2.8ms 39.7MB 200ms 3ms deno 1.30.0
dart 1.dart 215ms 2.6ms 17.1MB 200ms 0ms dart/exe 2.19.0
kotlin 2-m.kt 224ms 4.4ms 32.4MB 383ms 3ms kotlin/native 1.8.0
ruby 1.rb 264ms 2.9ms 32.9MB 233ms 13ms ruby/yjit 3.2.0
javascript 1.js 296ms 6.1ms 117.4MB 287ms 17ms bun 0.5.1
ruby 1.rb 334ms 3.9ms 32.3MB 307ms 17ms ruby 3.2.0
javascript 1.js 376ms 2.1ms 49.6MB 367ms 3ms node 19.5.0
nim 1.nim 387ms 3.1ms 1.2MB 373ms 0ms nim/clang 1.6.10
javascript 2.js 429ms 10ms 102.0MB 440ms 17ms bun 0.5.1
nim 1.nim 465ms 40ms 1.0MB 447ms 0ms nim 1.6.10
python 1.py 476ms 3.0ms 8.7MB 460ms 0ms pyston 3.8.12
python 2.py 539ms 3.6ms 8.2MB 523ms 0ms pyston 3.8.12
python 1.py 619ms 4.0ms 8.9MB 607ms 0ms cpython 3.11.1
ruby 1-m.rb 619ms 11ms 311.7MB 913ms 103ms truffleruby 22.3.1
python 2.py 745ms 5.0ms 8.4MB 733ms 0ms cpython 3.11.1
csharp 1.cs 2831ms 3.6ms 62.5MB 2810ms 17ms dotnet/aot 7.0.102
csharp 1.cs 3108ms 42ms 150.6MB 3047ms 40ms dotnet 7.0.102
csharp 1.cs 3186ms 6.2ms 33.9MB 3167ms 3ms mono 6.12.0
kotlin 1.kt timeout 0.0ms 17.1MB 5000ms 7ms kotlin/native 1.8.0