All lru problem benchmarks

Current benchmark data was generated on Thu May 04 2023, full log can be found HERE


[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.)


Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 47ms 0.1ms 2.8MB 37ms 0ms zig 0.11.0-dev.2969+855493bb8
crystal 55ms 0.4ms 3.0MB 40ms 0ms crystal 1.8.1
rust 57ms 7.2ms 1.0MB 43ms 0ms rustc 1.69.0
rust 89ms 7.7ms 1.1MB 80ms 0ms rustc 1.69.0
crystal 91ms 0.4ms 3.0MB 80ms 0ms crystal 1.8.1
csharp 2.cs 134ms 1.5ms 10.1MB 123ms 0ms dotnet/aot 7.0.203
nim 2.nim 149ms 0.2ms 1.3MB 140ms 0ms nim/clang 1.6.12
nim 2.nim 153ms 0.7ms 1.0MB 140ms 0ms nim 1.6.12
wasm 160ms 2.1ms 15.6MB 147ms 0ms wasmedgec 0.12.0
go 3.go 167ms 0.6ms 2.0MB 157ms 0ms tinygo 0.27.0
d 1.d 172ms 1.7ms 4.1MB 160ms 0ms ldc2 1.32.1
go 3.go 174ms 8.9ms 3.4MB 153ms 0ms go 1.20.4
wasm 192ms 6.2ms 15.8MB 177ms 0ms wasmtime 8.0.1
csharp 2.cs 195ms 1.2ms 24.0MB 180ms 0ms mono 6.12.0
haxe 1.hx 200ms 9.2ms 20.4MB 180ms 7ms haxe/cpp 4.2.5
csharp 2.cs 204ms 0.8ms 31.4MB 170ms 7ms dotnet 7.0.203
haxe 1.hx 209ms 2.4ms 2.9MB 197ms 0ms haxe/hl/c 4.2.5
dart 2.dart 220ms 4.5ms 8.9MB 207ms 0ms dart/exe
haxe 1.hx 230ms 8.2ms 3.6MB 217ms 0ms haxe/hl/jit 1.13.0
python 232ms 1.0ms 71.0MB 203ms 17ms pypy 3.9.16
dart 2.dart 239ms 11ms 17.2MB 223ms 0ms dart/exe 2.19.6
ocaml 250ms 4.9ms 6.7MB 240ms 0ms ocaml 5.0.0
kotlin 2-m.kt 253ms 11ms 113.5MB 353ms 33ms kotlin/jvm 17.0.2
d 1.d 256ms 0.9ms 5.6MB 250ms 0ms dmd 2.103.1
kotlin 1.kt 262ms 7.2ms 109.4MB 323ms 27ms kotlin/jvm 17.0.2
wasm 269ms 3.7ms 53.8MB 260ms 7ms node 18.16.0
odin 1.odin 276ms 9.7ms 1.3MB 260ms 0ms odin 2023
python 278ms 6.3ms 71.9MB 247ms 13ms pypy 3.9.16
javascript 2.js 355ms 4.3ms 57.2MB 340ms 10ms node 20.0.0
v 1.v 356ms 1.0ms 2.2MB 343ms 0ms v/clang+gc 0.3.4
v 1.v 367ms 0.4ms 2.2MB 353ms 0ms v/clang 0.3.4
typescript 2.ts 381ms 2.7ms 50.4MB 377ms 3ms deno 1.33.1
kotlin 2.kt 470ms 6.6ms 6.5MB 677ms 17ms kotlin/native 1.8.21
ruby 1.rb 473ms 15ms 32.9MB 450ms 7ms ruby/yjit 3.2.2
javascript 1.js 651ms 3.0ms 143.4MB 637ms 43ms bun 0.5.9
ruby 1.rb 658ms 7.7ms 32.4MB 633ms 7ms ruby 3.2.2
javascript 2.js 683ms 4.4ms 112.9MB 670ms 33ms bun 0.5.9
typescript 1.ts 687ms 1.5ms 49.7MB 673ms 7ms deno 1.33.1
javascript 1.js 701ms 2.2ms 55.3MB 680ms 10ms node 20.0.0
kotlin 1.kt 764ms 16ms 6.7MB 920ms 10ms kotlin/native 1.8.21
python 925ms 7.8ms 9.0MB 907ms 0ms pyston 3.8.12
ruby 1-m.rb 985ms 50ms 320.7MB 1427ms 120ms truffleruby 22.3.1
dart 1.dart 1053ms 4.2ms 8.7MB 1033ms 0ms dart/exe
dart 1.dart 1068ms 3.5ms 16.8MB 1053ms 0ms dart/exe 2.19.6
python 1073ms 2.7ms 8.8MB 1057ms 0ms pyston 3.8.12
python 1276ms 27ms 9.3MB 1257ms 0ms cpython 3.11.3
python 1421ms 16ms 9.1MB 1407ms 0ms cpython 3.11.3
csharp 1.cs 1510ms 9.5ms 58.2MB 1487ms 20ms dotnet/aot 7.0.203
csharp 1.cs 1765ms 44ms 75.2MB 1700ms 27ms dotnet 7.0.203
csharp 1.cs 3357ms 2.0ms 47.6MB 3290ms 57ms mono 6.12.0
nim 1.nim timeout 0.0ms 1.2MB 4987ms 0ms nim/clang 1.6.12
nim 1.nim timeout 0.0ms 1.0MB 4990ms 0ms nim 1.6.12

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 135ms 0.7ms 2.7MB 127ms 0ms zig 0.11.0-dev.2969+855493bb8
crystal 157ms 1.2ms 3.1MB 143ms 0ms crystal 1.8.1
rust 202ms 3.5ms 1.0MB 193ms 0ms rustc 1.69.0
crystal 266ms 1.4ms 3.1MB 253ms 0ms crystal 1.8.1
rust 304ms 10ms 1.1MB 293ms 0ms rustc 1.69.0
csharp 2.cs 382ms 1.5ms 10.1MB 380ms 0ms dotnet/aot 7.0.203
kotlin 2.kt 425ms 9.3ms 131.5MB 523ms 37ms kotlin/jvm 17.0.2
csharp 2.cs 428ms 1.5ms 27.4MB 400ms 7ms dotnet 7.0.203
nim 2.nim 441ms 0.9ms 1.2MB 430ms 0ms nim/clang 1.6.12
nim 2.nim 454ms 4.3ms 1.0MB 440ms 0ms nim 1.6.12
wasm 459ms 1.8ms 15.2MB 440ms 0ms wasmedgec 0.12.0
go 3.go 491ms 1.8ms 3.4MB 480ms 0ms go 1.20.4
kotlin 1.kt 491ms 4.8ms 132.3MB 527ms 37ms kotlin/jvm 17.0.2
go 3.go 491ms 0.5ms 0.4MB 480ms 0ms tinygo 0.27.0
d 1.d 497ms 1.0ms 3.7MB 490ms 0ms ldc2 1.32.1
csharp 2.cs 525ms 1.5ms 25.3MB 513ms 0ms mono 6.12.0
haxe 1.hx 549ms 11ms 25.6MB 537ms 7ms haxe/cpp 4.2.5
wasm 554ms 14ms 15.7MB 537ms 0ms wasmtime 8.0.1
python 557ms 2.9ms 71.5MB 527ms 20ms pypy 3.9.16
python 608ms 1.1ms 72.4MB 587ms 7ms pypy 3.9.16
haxe 1.hx 615ms 3.9ms 2.9MB 600ms 0ms haxe/hl/c 4.2.5
dart 2.dart 642ms 2.6ms 8.7MB 623ms 3ms dart/exe
haxe 1.hx 669ms 6.6ms 3.7MB 653ms 3ms haxe/hl/jit 1.13.0
dart 2.dart 678ms 10ms 15.1MB 657ms 3ms dart/exe 2.19.6
wasm 690ms 3.5ms 53.3MB 677ms 13ms node 18.16.0
ocaml 727ms 1.6ms 6.7MB 717ms 0ms ocaml 5.0.0
d 1.d 756ms 0.3ms 7.6MB 747ms 0ms dmd 2.103.1
odin 1.odin 811ms 7.7ms 1.3MB 800ms 0ms odin 2023
javascript 2.js 944ms 7.0ms 63.9MB 920ms 17ms node 20.0.0
typescript 2.ts 1055ms 1.4ms 57.7MB 1047ms 10ms deno 1.33.1
v 1.v 1069ms 13ms 2.3MB 1053ms 0ms v/clang+gc 0.3.4
v 1.v 1094ms 1.4ms 2.2MB 1083ms 0ms v/clang 0.3.4
ruby 1.rb 1241ms 4.1ms 32.9MB 1213ms 17ms ruby/yjit 3.2.2
kotlin 2.kt 1401ms 21ms 10.2MB 2060ms 37ms kotlin/native 1.8.21
ruby 1.rb 1814ms 14ms 32.4MB 1790ms 10ms ruby 3.2.2
javascript 1.js 1837ms 5.4ms 172.3MB 1850ms 63ms bun 0.5.9
ruby 1.rb 1843ms 9.4ms 374.4MB 2410ms 177ms truffleruby 22.3.1
javascript 2.js 1937ms 15ms 118.5MB 1943ms 20ms bun 0.5.9
typescript 1.ts 1987ms 9.7ms 56.1MB 1967ms 10ms deno 1.33.1
javascript 1.js 1996ms 11ms 61.7MB 1977ms 10ms node 20.0.0
kotlin 1.kt 2267ms 23ms 6.8MB 2757ms 23ms kotlin/native 1.8.21
python 2726ms 8.2ms 9.0MB 2710ms 0ms pyston 3.8.12
dart 1.dart 3140ms 6.3ms 8.4MB 3123ms 3ms dart/exe
python 3173ms 4.4ms 8.7MB 3160ms 0ms pyston 3.8.12
dart 1.dart 3182ms 6.6ms 14.9MB 3160ms 7ms dart/exe 2.19.6
python 3748ms 29ms 9.2MB 3733ms 0ms cpython 3.11.3
python 4262ms 61ms 9.1MB 4247ms 0ms cpython 3.11.3
csharp 1.cs 4474ms 9.6ms 58.6MB 4450ms 17ms dotnet/aot 7.0.203
csharp 1.cs 4907ms 65ms 75.6MB 4857ms 37ms dotnet 7.0.203
csharp 1.cs timeout 0.0ms 47.6MB 4927ms 67ms mono 6.12.0
nim 1.nim timeout 0.0ms 1.3MB 4983ms 0ms nim/clang 1.6.12
nim 1.nim timeout 0.0ms 1.1MB 4987ms 0ms nim 1.6.12

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 22ms 0.4ms 1.0MB 10ms 0ms zig 0.11.0-dev.2969+855493bb8
crystal 27ms 0.6ms 3.1MB 20ms 0ms crystal 1.8.1
rust 34ms 1.5ms 1.8MB 20ms 0ms rustc 1.69.0
crystal 47ms 0.7ms 2.9MB 40ms 0ms crystal 1.8.1
rust 53ms 2.0ms 1.0MB 40ms 0ms rustc 1.69.0
nim 2.nim 66ms 0.2ms 1.2MB 57ms 0ms nim/clang 1.6.12
nim 2.nim 66ms 0.2ms 1.0MB 57ms 0ms nim 1.6.12
csharp 2.cs 71ms 2.5ms 8.1MB 67ms 0ms dotnet/aot 7.0.203
d 1.d 74ms 1.1ms 3.8MB 63ms 0ms ldc2 1.32.1
go 3.go 81ms 0.5ms 0.0MB 70ms 0ms tinygo 0.27.0
wasm 82ms 0.5ms 15.4MB 70ms 0ms wasmedgec 0.12.0
haxe 1.hx 88ms 1.1ms 12.2MB 73ms 3ms haxe/cpp 4.2.5
go 3.go 93ms 11ms 3.9MB 80ms 0ms go 1.20.4
wasm 101ms 2.7ms 15.6MB 87ms 0ms wasmtime 8.0.1
haxe 1.hx 103ms 0.5ms 2.8MB 93ms 0ms haxe/hl/c 4.2.5
dart 2.dart 103ms 1.5ms 8.5MB 90ms 0ms dart/exe
ocaml 110ms 0.4ms 6.0MB 93ms 0ms ocaml 5.0.0
csharp 2.cs 112ms 0.5ms 25.1MB 93ms 0ms mono 6.12.0
odin 1.odin 112ms 0.3ms 1.2MB 97ms 0ms odin 2023
dart 2.dart 112ms 2.4ms 14.8MB 93ms 0ms dart/exe 2.19.6
d 1.d 112ms 0.1ms 5.8MB 103ms 0ms dmd 2.103.1
haxe 1.hx 113ms 0.5ms 3.6MB 103ms 0ms haxe/hl/jit 1.13.0
v 1.v 126ms 0.5ms 2.3MB 110ms 0ms v/clang+gc 0.3.4
v 1.v 130ms 1.9ms 2.2MB 120ms 0ms v/clang 0.3.4
csharp 2.cs 139ms 5.6ms 29.6MB 100ms 3ms dotnet 7.0.203
wasm 157ms 1.4ms 51.3MB 150ms 7ms node 18.16.0
python 162ms 0.5ms 71.2MB 130ms 13ms pypy 3.9.16
dart 1.dart 177ms 2.8ms 9.2MB 160ms 0ms dart/exe
dart 1.dart 181ms 2.3ms 17.0MB 167ms 3ms dart/exe 2.19.6
python 181ms 1.1ms 72.4MB 140ms 23ms pypy 3.9.16
kotlin 1.kt 186ms 1.7ms 73.9MB 240ms 27ms kotlin/jvm 17.0.2
javascript 2.js 194ms 0.4ms 50.9MB 180ms 10ms node 20.0.0
typescript 2.ts 198ms 2.7ms 46.6MB 183ms 10ms deno 1.33.1
kotlin 2-m.kt 213ms 11ms 83.5MB 290ms 33ms kotlin/jvm 17.0.2
typescript 1.ts 228ms 9.4ms 45.8MB 213ms 3ms deno 1.33.1
kotlin 2.kt 237ms 1.2ms 8.1MB 350ms 0ms kotlin/native 1.8.21
javascript 1.js 239ms 0.9ms 52.0MB 227ms 7ms node 20.0.0
kotlin 1.kt 255ms 4.9ms 5.0MB 333ms 3ms kotlin/native 1.8.21
ruby 1.rb 272ms 2.5ms 32.8MB 243ms 13ms ruby/yjit 3.2.2
javascript 1.js 323ms 1.1ms 118.3MB 320ms 20ms bun 0.5.9
ruby 1.rb 363ms 3.1ms 32.3MB 333ms 17ms ruby 3.2.2
javascript 2.js 376ms 5.4ms 109.9MB 370ms 27ms bun 0.5.9
nim 1.nim 388ms 2.0ms 1.2MB 377ms 0ms nim/clang 1.6.12
nim 1.nim 416ms 1.7ms 1.0MB 400ms 0ms nim 1.6.12
python 444ms 1.3ms 8.8MB 430ms 0ms pyston 3.8.12
python 506ms 6.4ms 8.3MB 490ms 0ms pyston 3.8.12
python 598ms 1.3ms 8.7MB 583ms 0ms cpython 3.11.3
python 712ms 6.9ms 8.4MB 697ms 0ms cpython 3.11.3
ruby 1-m.rb 721ms 29ms 322.6MB 1060ms 123ms truffleruby 22.3.1
csharp 1.cs 4338ms 3.6ms 53.4MB 4313ms 17ms dotnet/aot 7.0.203
csharp 1.cs 4517ms 5.1ms 73.2MB 4470ms 30ms dotnet 7.0.203
csharp 1.cs 4606ms 11ms 33.5MB 4583ms 3ms mono 6.12.0