All lru problem benchmarks

Current benchmark data was generated on Wed May 25 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (Model 85)

* -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 50ms 0.3ms 1.6MB 40ms 0ms zig 0.10.0
rust 0-unsafe.rs 59ms 7.6ms 0.6MB 47ms 0ms rustc 1.61.0
crystal 0-unsafe.cr 63ms 1.8ms 3.0MB 50ms 0ms crystal 1.4.1
rust 1.rs 77ms 12ms 2.1MB 70ms 0ms rustc 1.61.0
crystal 1.cr 110ms 0.2ms 3.1MB 100ms 0ms crystal 1.4.1
wasm 1.rs 123ms 2.1ms 6.3MB 107ms 0ms wasmer/llvm 2.2.1
wasm 1.rs 129ms 9.2ms 10.9MB 117ms 0ms wasmtime 0.37.0
wasm 1.rs 141ms 0.5ms 9.2MB 130ms 0ms wasmedgec 0.9.1
nim 2.nim 148ms 0.5ms 0.9MB 140ms 0ms nim/clang 1.6.6
nim 2.nim 159ms 0.7ms 0.7MB 150ms 0ms nim 1.6.6
go 3.go 168ms 2.8ms 2.9MB 160ms 0ms go 1.18.2
odin 1.odin 172ms 12ms 1.9MB 163ms 0ms odin 2022
go 3.go 173ms 0.5ms 0.3MB 160ms 0ms tinygo 0.23.0
d 1.d 180ms 2.8ms 4.0MB 170ms 0ms ldc2 1.29.0
haxe 1.hx 191ms 0.8ms 22.2MB 173ms 7ms haxe/cpp 4.2.4
csharp 2.cs 197ms 1.2ms 27.4MB 183ms 0ms mono 6.12.0
ocaml 1.ml 203ms 0.4ms 5.8MB 190ms 0ms ocaml 4.14.0
csharp 2.cs 210ms 0.9ms 27.7MB 173ms 0ms dotnet 6.0.300
haxe 1.hx 212ms 1.2ms 2.9MB 197ms 0ms haxe/hl/c 4.2.4
wasm 1.rs 222ms 4.3ms 45.8MB 237ms 7ms node 16.15.0
dart 2.dart 235ms 1.4ms 41.6MB 203ms 13ms dart/exe 2.17.0
python 2.py 235ms 0.8ms 74.1MB 203ms 13ms pypy 3.8.13
kotlin 2-m.kt 243ms 1.3ms 112.3MB 323ms 47ms kotlin/jvm 17.0.2
haxe 1.hx 250ms 5.8ms 3.8MB 237ms 0ms haxe/hl/jit 1.12.0
d 1.d 255ms 0.3ms 4.9MB 240ms 0ms dmd 2.100.0
kotlin 1.kt 256ms 2.6ms 109.7MB 307ms 33ms kotlin/jvm 17.0.2
python 1.py 280ms 0.3ms 75.4MB 250ms 17ms pypy 3.8.13
v 1.v 339ms 0.2ms 0.6MB 330ms 0ms v/clang 0.2.4
v 1.v 362ms 2.8ms 2.3MB 350ms 0ms v/clang+gc 0.2.4
kotlin 2.kt 395ms 25ms 92.1MB 363ms 13ms kotlin/native 1.6.21
ruby 1.rb 601ms 3.2ms 30.2MB 573ms 13ms ruby 3.1.2
ruby 1.rb 668ms 1.4ms 286.7MB 507ms 147ms ruby/yjit 3.1.2
typescript 2.ts 758ms 0.5ms 44.4MB 747ms 7ms deno 1.22.0
javascript 2.js 849ms 2.0ms 55.0MB 833ms 7ms node 18.2.0
python 1.py 878ms 5.1ms 9.3MB 867ms 0ms pyston 3.8.12
python 2.py 1055ms 2.7ms 9.1MB 1040ms 0ms pyston 3.8.12
dart 1.dart 1062ms 0.5ms 44.4MB 1033ms 17ms dart/exe 2.17.0
typescript 1.ts 1088ms 0.2ms 43.7MB 1073ms 7ms deno 1.22.0
ruby 1-m.rb 1118ms 34ms 324.3MB 1683ms 130ms truffleruby 22.1.0
javascript 1.js 1145ms 3.1ms 57.1MB 1117ms 20ms node 18.2.0
csharp 1.cs 1575ms 7.0ms 75.7MB 1540ms 20ms dotnet 6.0.300
python 1.py 1743ms 15ms 8.4MB 1730ms 0ms cpython 3.10.4
python 2.py 2570ms 50ms 8.3MB 2557ms 0ms cpython 3.10.4
csharp 1.cs 3411ms 3.0ms 47.7MB 3360ms 43ms mono 6.12.0
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.6.21
nim 1.nim timeout 0.0ms 0.0MB 0ms 0ms nim/clang 1.6.6
nim 1.nim timeout 0.0ms 0.0MB 0ms 0ms nim 1.6.6
pony 1.pony timeout 0.0ms 0.0MB 0ms 0ms ponyc 0.50.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 145ms 2.9ms 1.6MB 133ms 0ms zig 0.10.0
crystal 0-unsafe.cr 176ms 0.2ms 4.9MB 160ms 0ms crystal 1.4.1
rust 0-unsafe.rs 204ms 28ms 0.6MB 193ms 0ms rustc 1.61.0
rust 1.rs 285ms 29ms 2.2MB 277ms 0ms rustc 1.61.0
crystal 1.cr 323ms 4.4ms 5.1MB 310ms 0ms crystal 1.4.1
wasm 1.rs 356ms 1.5ms 6.2MB 340ms 0ms wasmer/llvm 2.2.1
wasm 1.rs 386ms 27ms 10.2MB 373ms 0ms wasmtime 0.37.0
wasm 1.rs 394ms 4.9ms 11.2MB 380ms 0ms wasmedgec 0.9.1
kotlin 2.kt 417ms 7.8ms 127.4MB 510ms 47ms kotlin/jvm 17.0.2
nim 2.nim 422ms 30ms 0.9MB 405ms 0ms nim/clang 1.6.6
csharp 2.cs 464ms 4.2ms 28.0MB 437ms 7ms dotnet 6.0.300
nim 2.nim 467ms 0.4ms 0.7MB 460ms 0ms nim 1.6.6
kotlin 1.kt 484ms 10.0ms 138.4MB 517ms 53ms kotlin/jvm 17.0.2
wasm 1.rs 489ms 7.3ms 42.4MB 500ms 10ms node 16.15.0
go 3.go 490ms 1.6ms 2.9MB 477ms 0ms go 1.18.2
go 3.go 512ms 0.2ms 2.3MB 500ms 0ms tinygo 0.23.0
csharp 2.cs 526ms 3.2ms 26.0MB 510ms 0ms mono 6.12.0
d 1.d 527ms 4.1ms 4.1MB 520ms 0ms ldc2 1.29.0
odin 1.odin 530ms 2.9ms 1.8MB 517ms 0ms odin 2022
haxe 1.hx 538ms 1.5ms 27.4MB 537ms 3ms haxe/cpp 4.2.4
python 2.py 562ms 4.3ms 74.6MB 523ms 17ms pypy 3.8.13
python 1.py 614ms 2.1ms 76.1MB 583ms 17ms pypy 3.8.13
ocaml 1.ml 627ms 47ms 5.9MB 610ms 0ms ocaml 4.14.0
haxe 1.hx 628ms 5.9ms 3.0MB 613ms 0ms haxe/hl/c 4.2.4
dart 2.dart 648ms 1.1ms 42.7MB 620ms 17ms dart/exe 2.17.0
haxe 1.hx 735ms 13ms 3.6MB 717ms 3ms haxe/hl/jit 1.12.0
d 1.d 744ms 1.9ms 4.8MB 737ms 0ms dmd 2.100.0
v 1.v 1013ms 1.0ms 0.6MB 1000ms 0ms v/clang 0.2.4
v 1.v 1076ms 4.4ms 2.2MB 1067ms 0ms v/clang+gc 0.2.4
kotlin 2.kt 1335ms 16ms 150.2MB 1290ms 30ms kotlin/native 1.6.21
ruby 1.rb 1454ms 1.2ms 286.8MB 1283ms 153ms ruby/yjit 3.1.2
ruby 1.rb 1827ms 148ms 30.2MB 1800ms 10ms ruby 3.1.2
ruby 1-m.rb 1929ms 66ms 366.3MB 2780ms 180ms truffleruby 22.1.0
typescript 2.ts 2140ms 101ms 51.9MB 2137ms 7ms deno 1.22.0
javascript 2.js 2393ms 20ms 58.1MB 2380ms 13ms node 18.2.0
python 1.py 2586ms 14ms 9.3MB 2570ms 0ms pyston 3.8.12
typescript 1.ts 2827ms 5.7ms 51.8MB 2803ms 17ms deno 1.22.0
python 2.py 3121ms 7.9ms 9.0MB 3107ms 0ms pyston 3.8.12
dart 1.dart 3126ms 1.8ms 44.4MB 3097ms 13ms dart/exe 2.17.0
javascript 1.js 3152ms 220ms 56.9MB 3113ms 30ms node 18.2.0
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet 6.0.300
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms mono 6.12.0
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.6.21
nim 1.nim timeout 0.0ms 0.0MB 0ms 0ms nim/clang 1.6.6
nim 1.nim timeout 0.0ms 0.0MB 0ms 0ms nim 1.6.6
pony 1.pony timeout 0.0ms 0.0MB 0ms 0ms ponyc 0.50.0
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 2.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 24ms 0.2ms 0.0MB 10ms 0ms zig 0.10.0
crystal 0-unsafe.cr 31ms 2.3ms 3.1MB 20ms 0ms crystal 1.4.1
rust 0-unsafe.rs 32ms 0.5ms 0.6MB 20ms 0ms rustc 1.61.0
rust 1.rs 40ms 0.9ms 0.7MB 30ms 0ms rustc 1.61.0
crystal 1.cr 57ms 1.1ms 5.1MB 47ms 0ms crystal 1.4.1
nim 2.nim 65ms 0.1ms 0.9MB 53ms 0ms nim/clang 1.6.6
wasm 1.rs 68ms 5.3ms 9.1MB 57ms 0ms wasmtime 0.37.0
nim 2.nim 68ms 0.3ms 0.7MB 60ms 0ms nim 1.6.6
wasm 1.rs 69ms 13ms 5.7MB 53ms 0ms wasmer/llvm 2.2.1
d 1.d 76ms 1.8ms 3.8MB 60ms 0ms ldc2 1.29.0
wasm 1.rs 77ms 2.6ms 9.2MB 70ms 0ms wasmedgec 0.9.1
odin 1.odin 78ms 5.8ms 0.9MB 70ms 0ms odin 2022
go 3.go 85ms 0.3ms 0.0MB 77ms 0ms tinygo 0.23.0
go 3.go 88ms 0.8ms 4.1MB 80ms 0ms go 1.18.2
haxe 1.hx 88ms 0.9ms 14.3MB 70ms 0ms haxe/cpp 4.2.4
ocaml 1.ml 91ms 0.4ms 5.1MB 80ms 0ms ocaml 4.14.0
dart 2.dart 106ms 0.4ms 20.8MB 87ms 7ms dart/exe 2.17.0
haxe 1.hx 107ms 2.0ms 3.1MB 97ms 0ms haxe/hl/c 4.2.4
d 1.d 111ms 0.9ms 5.2MB 100ms 0ms dmd 2.100.0
csharp 2.cs 112ms 0.8ms 27.2MB 97ms 0ms mono 6.12.0
v 1.v 120ms 0.6ms 0.6MB 110ms 0ms v/clang 0.2.4
haxe 1.hx 121ms 0.5ms 3.7MB 107ms 0ms haxe/hl/jit 1.12.0
v 1.v 127ms 1.0ms 2.3MB 120ms 0ms v/clang+gc 0.2.4
csharp 2.cs 132ms 3.8ms 25.9MB 97ms 7ms dotnet 6.0.300
wasm 1.rs 152ms 3.7ms 42.6MB 167ms 3ms node 16.15.0
python 2.py 167ms 1.7ms 74.0MB 133ms 17ms pypy 3.8.13
python 1.py 184ms 0.5ms 74.3MB 143ms 17ms pypy 3.8.13
kotlin 1.kt 184ms 1.5ms 74.1MB 240ms 27ms kotlin/jvm 17.0.2
kotlin 2.kt 192ms 3.8ms 42.1MB 167ms 10ms kotlin/native 1.6.21
dart 1.dart 196ms 0.1ms 46.4MB 167ms 13ms dart/exe 2.17.0
kotlin 2-m.kt 199ms 1.9ms 78.8MB 280ms 30ms kotlin/jvm 17.0.2
ruby 1.rb 334ms 0.5ms 30.0MB 313ms 3ms ruby 3.1.2
typescript 2.ts 361ms 21ms 38.0MB 343ms 7ms deno 1.22.0
typescript 1.ts 411ms 4.9ms 37.3MB 397ms 0ms deno 1.22.0
ruby 1.rb 419ms 1.1ms 286.8MB 280ms 123ms ruby/yjit 3.1.2
python 1.py 431ms 5.2ms 8.9MB 413ms 0ms pyston 3.8.12
javascript 2.js 440ms 2.4ms 46.5MB 423ms 7ms node 18.2.0
javascript 1.js 465ms 0.8ms 42.7MB 443ms 17ms node 18.2.0
nim 1.nim 467ms 0.9ms 0.7MB 457ms 0ms nim 1.6.6
nim 1.nim 485ms 0.9ms 0.9MB 473ms 0ms nim/clang 1.6.6
python 2.py 487ms 2.4ms 8.5MB 477ms 0ms pyston 3.8.12
ruby 1-m.rb 801ms 86ms 311.0MB 1277ms 97ms truffleruby 22.1.0
python 1.py 811ms 4.9ms 7.8MB 793ms 3ms cpython 3.10.4
python 2.py 1234ms 16ms 7.3MB 1217ms 0ms cpython 3.10.4
pony 1.pony 2644ms 2.1ms 37.0MB 2693ms 0ms ponyc 0.50.0
csharp 1.cs 4345ms 104ms 62.0MB 4307ms 27ms dotnet 6.0.300
csharp 1.cs 4416ms 309ms 32.3MB 4393ms 10ms mono 6.12.0
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.6.21