All lru problem benchmarks

Current benchmark data was generated on Sat Nov 16 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 34ms 0.7ms 2.9MB 27ms 0ms zig 0.13.0
crystal 0-unsafe.cr 36ms 0.9ms 3.1MB 23ms 0ms crystal 1.14.0
rust 0-unsafe.rs 42ms 1.1ms 1.9MB 30ms 0ms rustc 1.82.0
rust 1.rs 50ms 12ms 2.0MB 37ms 0ms rustc 1.82.0
crystal 1.cr 65ms 0.9ms 3.1MB 53ms 0ms crystal 1.14.0
wasm 1.rs 90ms 1.4ms 20.8MB 73ms 7ms wasmtime 25.0.3
csharp 2.cs 95ms 2.1ms 13.7MB 80ms 3ms dotnet/aot 9.0.100
nim 2.nim 116ms 1.8ms 1.6MB 110ms 0ms nim 2.2.0
nim 2.nim 117ms 0.9ms 1.6MB 110ms 0ms nim/clang 2.2.0
d 1.d 125ms 0.3ms 6.1MB 117ms 3ms ldc2 1.39.0
go 3.go 131ms 3.4ms 3.4MB 123ms 0ms go 1.23.3
haxe 1.hx 133ms 2.3ms 20.5MB 117ms 7ms haxe/cpp 4.3.6
go 3.go 133ms 2.8ms 0.3MB 123ms 0ms tinygo 0.34.0
haxe 1.hx 136ms 0.7ms 5.0MB 130ms 0ms haxe/hl/c 4.3.6
python 2.py 145ms 2.6ms 58.0MB 117ms 10ms pypy 3.10.14
csharp 2.cs 150ms 1.1ms 23.2MB 140ms 0ms mono 6.12.0
haxe 1.hx 159ms 2.4ms 5.7MB 150ms 0ms haxe/hl/jit 1.14.0
odin 1.odin 162ms 12ms 1.6MB 150ms 0ms odin 2024
dart 2.dart 165ms 2.0ms 9.4MB 150ms 0ms dart/exe 3.5.4
kotlin 1-m.kt 179ms 2.4ms 96.4MB 293ms 27ms kotlin/jvm 21
ocaml 1.ml 180ms 5.6ms 6.5MB 167ms 0ms ocaml 5.2.0
python 1.py 182ms 3.8ms 59.6MB 143ms 23ms pypy 3.10.14
d 1.d 185ms 10ms 7.9MB 157ms 33ms dmd 2.109.1
kotlin 2-m.kt 193ms 1.1ms 103.4MB 407ms 40ms kotlin/jvm 21
v 1.v 237ms 4.3ms 1.3MB 223ms 0ms v/clang 0.4.8
csharp 2.cs 249ms 2.0ms 35.6MB 230ms 10ms dotnet 9.0.100
v 1.v 259ms 3.8ms 2.1MB 247ms 0ms v/clang+gc 0.4.8
typescript 2.ts 270ms 3.1ms 66.0MB 257ms 17ms deno 2.0.6
kotlin 2.kt 304ms 3.0ms 7.9MB 427ms 13ms kotlin/native 1.8.21
javascript 2.js 311ms 2.2ms 66.6MB 307ms 7ms node 23.1.0
ruby 1.rb 325ms 1.4ms 28.4MB 300ms 10ms ruby/yjit 3.3.6
dart 1.dart 492ms 5.5ms 9.4MB 480ms 0ms dart/exe 3.5.4
kotlin 1.kt 515ms 18ms 7.8MB 623ms 3ms kotlin/native 1.8.21
ruby 1.rb 515ms 2.8ms 28.3MB 483ms 20ms ruby 3.3.6
javascript 1.js 552ms 1.4ms 64.7MB 533ms 13ms node 23.1.0
typescript 1.ts 581ms 18ms 62.6MB 553ms 23ms deno 2.0.6
javascript 2.js 638ms 4.6ms 121.9MB 677ms 63ms bun 1.1.34
ruby 1-m.rb 675ms 8.6ms 379.0MB 1210ms 120ms truffleruby 24.1.1
python 1.py 718ms 9.3ms 8.9MB 707ms 0ms pyston 3.8.12
python 2.py 835ms 13ms 8.5MB 817ms 0ms pyston 3.8.12
javascript 1.js 895ms 5.4ms 106.0MB 977ms 80ms bun 1.1.34
csharp 1.cs 1058ms 2.9ms 16.9MB 1037ms 7ms dotnet/aot 9.0.100
python 1.py 1128ms 15ms 9.4MB 1110ms 0ms cpython 3.13.0
python 2.py 1311ms 25ms 9.1MB 1300ms 0ms cpython 3.13.0
csharp 1.cs 1361ms 146ms 36.7MB 1350ms 10ms dotnet 9.0.100
csharp 1.cs 3309ms 45ms 47.6MB 3260ms 43ms 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: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 95ms 2.2ms 2.9MB 87ms 0ms zig 0.13.0
crystal 0-unsafe.cr 100ms 0.6ms 3.1MB 90ms 0ms crystal 1.14.0
rust 0-unsafe.rs 155ms 0.3ms 1.9MB 150ms 0ms rustc 1.82.0
crystal 1.cr 183ms 1.6ms 3.1MB 170ms 0ms crystal 1.14.0
rust 1.rs 205ms 20ms 2.0MB 193ms 0ms rustc 1.82.0
wasm 1.rs 253ms 1.2ms 18.7MB 243ms 0ms wasmtime 25.0.3
csharp 2.cs 265ms 1.2ms 13.6MB 250ms 0ms dotnet/aot 9.0.100
kotlin 2-m.kt 304ms 11ms 212.8MB 533ms 40ms kotlin/jvm 21
kotlin 1.kt 325ms 2.9ms 202.8MB 440ms 27ms kotlin/jvm 21
nim 2.nim 334ms 3.3ms 1.6MB 323ms 0ms nim/clang 2.2.0
nim 2.nim 338ms 3.9ms 1.4MB 327ms 0ms nim 2.2.0
python 2.py 341ms 8.9ms 58.9MB 317ms 10ms pypy 3.10.14
csharp 2.cs 357ms 1.6ms 26.6MB 343ms 0ms mono 6.12.0
d 1.d 364ms 6.3ms 4.0MB 350ms 23ms ldc2 1.39.0
haxe 1.hx 372ms 1.4ms 25.5MB 360ms 3ms haxe/cpp 4.3.6
python 1.py 373ms 0.1ms 60.4MB 357ms 0ms pypy 3.10.14
go 3.go 385ms 6.1ms 3.4MB 377ms 0ms go 1.23.3
go 3.go 391ms 4.4ms 2.1MB 380ms 0ms tinygo 0.34.0
haxe 1.hx 396ms 1.6ms 5.0MB 387ms 0ms haxe/hl/c 4.3.6
csharp 2.cs 401ms 4.2ms 35.5MB 380ms 13ms dotnet 9.0.100
odin 1.odin 457ms 5.4ms 1.6MB 447ms 0ms odin 2024
haxe 1.hx 457ms 0.9ms 5.7MB 450ms 0ms haxe/hl/jit 1.14.0
dart 2.dart 474ms 7.2ms 9.4MB 460ms 0ms dart/exe 3.5.4
ocaml 1.ml 522ms 18ms 6.6MB 510ms 0ms ocaml 5.2.0
d 1.d 539ms 17ms 8.1MB 520ms 53ms dmd 2.109.1
v 1.v 705ms 0.6ms 1.3MB 700ms 0ms v/clang 0.4.8
typescript 2.ts 721ms 14ms 73.8MB 703ms 27ms deno 2.0.6
v 1.v 763ms 11ms 2.1MB 750ms 0ms v/clang+gc 0.4.8
ruby 1.rb 828ms 5.1ms 28.5MB 797ms 17ms ruby/yjit 3.3.6
javascript 2.js 837ms 0.9ms 72.4MB 820ms 20ms node 23.1.0
kotlin 2.kt 898ms 0.8ms 7.8MB 1297ms 43ms kotlin/native 1.8.21
ruby 1-m.rb 1237ms 106ms 424.7MB 1713ms 170ms truffleruby 24.1.1
ruby 1.rb 1402ms 4.3ms 28.3MB 1373ms 10ms ruby 3.3.6
dart 1.dart 1461ms 15ms 9.4MB 1440ms 10ms dart/exe 3.5.4
javascript 1.js 1581ms 6.1ms 71.6MB 1560ms 13ms node 23.1.0
kotlin 1.kt 1591ms 14ms 7.9MB 1973ms 20ms kotlin/native 1.8.21
typescript 1.ts 1617ms 9.1ms 69.3MB 1597ms 13ms deno 2.0.6
javascript 2.js 1815ms 3.6ms 122.4MB 1950ms 77ms bun 1.1.34
python 1.py 2137ms 24ms 8.9MB 2123ms 0ms pyston 3.8.12
python 2.py 2471ms 28ms 8.5MB 2453ms 3ms pyston 3.8.12
javascript 1.js 2584ms 10ms 106.1MB 2877ms 143ms bun 1.1.34
csharp 1.cs 3169ms 19ms 17.0MB 3133ms 20ms dotnet/aot 9.0.100
python 1.py 3296ms 12ms 9.4MB 3280ms 0ms cpython 3.13.0
csharp 1.cs 3580ms 13ms 39.1MB 3560ms 20ms dotnet 9.0.100
python 2.py 3856ms 36ms 9.1MB 3843ms 0ms cpython 3.13.0
csharp 1.cs timeout 0.0ms 45.8MB 4940ms 43ms 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: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 15ms 0.2ms 1.4MB 10ms 0ms zig 0.13.0
crystal 0-unsafe.cr 19ms 1.1ms 3.0MB 10ms 0ms crystal 1.14.0
rust 0-unsafe.rs 26ms 0.5ms 1.9MB 20ms 0ms rustc 1.82.0
rust 1.rs 29ms 0.5ms 1.9MB 20ms 0ms rustc 1.82.0
crystal 1.cr 30ms 1.0ms 3.0MB 20ms 0ms crystal 1.14.0
wasm 1.rs 45ms 0.9ms 18.5MB 30ms 0ms wasmtime 25.0.3
nim 2.nim 50ms 1.5ms 1.5MB 40ms 0ms nim/clang 2.2.0
nim 2.nim 52ms 1.2ms 1.3MB 43ms 0ms nim 2.2.0
csharp 2.cs 54ms 0.7ms 13.5MB 37ms 3ms dotnet/aot 9.0.100
d 1.d 55ms 1.7ms 5.9MB 43ms 0ms ldc2 1.39.0
haxe 1.hx 62ms 2.1ms 12.3MB 53ms 0ms haxe/cpp 4.3.6
go 3.go 65ms 0.5ms 0.1MB 53ms 0ms tinygo 0.34.0
haxe 1.hx 67ms 0.3ms 5.0MB 60ms 0ms haxe/hl/c 4.3.6
go 3.go 69ms 1.3ms 5.5MB 60ms 0ms go 1.23.3
odin 1.odin 70ms 1.7ms 1.6MB 63ms 0ms odin 2024
ocaml 1.ml 75ms 0.7ms 6.0MB 70ms 0ms ocaml 5.2.0
dart 2.dart 78ms 1.3ms 9.4MB 60ms 0ms dart/exe 3.5.4
d 1.d 79ms 0.9ms 8.2MB 70ms 0ms dmd 2.109.1
haxe 1.hx 79ms 0.7ms 5.7MB 70ms 0ms haxe/hl/jit 1.14.0
v 1.v 90ms 0.1ms 1.3MB 80ms 0ms v/clang 0.4.8
csharp 2.cs 99ms 9.0ms 26.8MB 90ms 0ms mono 6.12.0
v 1.v 101ms 2.3ms 2.1MB 87ms 0ms v/clang+gc 0.4.8
python 2.py 104ms 1.1ms 57.8MB 77ms 10ms pypy 3.10.14
dart 1.dart 113ms 2.7ms 9.4MB 103ms 0ms dart/exe 3.5.4
python 1.py 121ms 3.3ms 58.5MB 93ms 13ms pypy 3.10.14
typescript 2.ts 138ms 2.8ms 60.0MB 130ms 10ms deno 2.0.6
kotlin 1-m.kt 140ms 3.1ms 90.2MB 267ms 27ms kotlin/jvm 21
kotlin 2.kt 142ms 3.9ms 5.7MB 200ms 0ms kotlin/native 1.8.21
kotlin 2-m.kt 154ms 12ms 98.0MB 293ms 37ms kotlin/jvm 21
javascript 1.js 162ms 1.3ms 61.7MB 143ms 13ms node 23.1.0
csharp 2.cs 163ms 2.9ms 35.6MB 137ms 17ms dotnet 9.0.100
javascript 2.js 165ms 1.4ms 60.3MB 157ms 3ms node 23.1.0
kotlin 1.kt 170ms 6.0ms 5.7MB 210ms 3ms kotlin/native 1.8.21
typescript 1.ts 193ms 42ms 59.6MB 177ms 13ms deno 2.0.6
ruby 1.rb 198ms 3.7ms 28.4MB 167ms 13ms ruby/yjit 3.3.6
ruby 1.rb 293ms 2.2ms 28.3MB 257ms 17ms ruby 3.3.6
javascript 1.js 326ms 3.6ms 114.6MB 360ms 67ms bun 1.1.34
python 1.py 346ms 5.2ms 8.5MB 333ms 0ms pyston 3.8.12
javascript 2.js 348ms 4.1ms 125.6MB 360ms 57ms bun 1.1.34
python 2.py 390ms 6.1ms 8.1MB 377ms 0ms pyston 3.8.12
nim 1.nim 482ms 6.4ms 1.5MB 477ms 0ms nim/clang 2.2.0
nim 1.nim 492ms 2.4ms 1.3MB 480ms 0ms nim 2.2.0
ruby 1-m.rb 531ms 4.6ms 370.3MB 1030ms 140ms truffleruby 24.1.1
python 1.py 539ms 9.9ms 9.1MB 523ms 0ms cpython 3.13.0
python 2.py 635ms 25ms 8.8MB 623ms 0ms cpython 3.13.0
csharp 1.cs 1613ms 13ms 38.5MB 1600ms 13ms dotnet 9.0.100
csharp 1.cs 1805ms 4.2ms 16.9MB 1787ms 3ms dotnet/aot 9.0.100
csharp 1.cs 1806ms 4.7ms 30.7MB 1790ms 3ms mono 6.12.0