All spectral-norm problem benchmarks

Current benchmark data was generated on Sun Dec 01 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.)

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 8-m.cpp 471ms 1.8ms 5.4MB 1820ms 0ms clang++ 14.0.0-1ubuntu1.1
zig 2-m.zig 476ms 6.6ms 3.8MB 1563ms 3ms zig 0.13.0
cpp 8-m.cpp 481ms 1.7ms 4.2MB 1863ms 0ms g++ 11.4.0
rust 8-m.rs 498ms 0.9ms 6.5MB 1900ms 7ms rustc 1.85.0-nightly
rust 7-m.rs 498ms 1.8ms 4.2MB 1907ms 10ms rustc 1.83.0
zig 2.zig 917ms 5.5ms 1.5MB 907ms 0ms zig 0.13.0
cpp 6-im.cpp 926ms 12ms 7.4MB 3607ms 10ms clang++ 14.0.0-1ubuntu1.1
cpp 6-im.cpp 929ms 8.1ms 4.2MB 3630ms 0ms g++ 11.4.0
c 6-im.c 956ms 1.0ms 4.1MB 3750ms 0ms gcc 14.2.0
c 4-m.c 966ms 0.5ms 4.0MB 3790ms 0ms gcc 14.2.0
c 6-im.c 1012ms 17ms 5.1MB 3937ms 7ms clang 14.0.0-1ubuntu1.1
rust 8.rs 1016ms 12ms 2.5MB 1003ms 0ms rustc 1.85.0-nightly
c 5-im.c 1124ms 47ms 4.1MB 4327ms 3ms gcc 14.2.0
c 4-m.c 1139ms 14ms 5.3MB 4427ms 10ms clang 14.0.0-1ubuntu1.1
c 5-im.c 1334ms 8.3ms 5.2MB 5227ms 3ms clang 14.0.0-1ubuntu1.1
c 3-m.c 1835ms 6.5ms 7.2MB 7190ms 10ms clang 14.0.0-1ubuntu1.1
csharp 3-m.cs 1876ms 14ms 18.4MB 7223ms 10ms dotnet/aot 9.0.100
go 4-m.go 1907ms 17ms 5.4MB 7330ms 10ms go 1.23.3
chapel 1-m.chpl 1933ms 21ms 33.0MB 3823ms 0ms chpl 1.31.0
csharp 3-m.cs 1941ms 14ms 38.2MB 7280ms 23ms dotnet 9.0.100
java 2-m.java 1952ms 6.8ms 47.7MB 7430ms 20ms openjdk 21
rust 2-m.rs 1952ms 2.2ms 6.2MB 7643ms 0ms rustc 1.83.0
java 2-m.java 1972ms 7.8ms 48.4MB 7477ms 27ms openjdk 23
c 3-m.c 1981ms 16ms 4.1MB 7780ms 0ms gcc 14.2.0
java 2-m.java 2092ms 3.1ms 45.2MB 7480ms 157ms openjdk/zgc 21
rust 7.rs 2122ms 22ms 1.9MB 2117ms 0ms rustc 1.83.0
javascript 6-m.js 2167ms 20ms 117.7MB 8173ms 63ms node 23.3.0
java 2-m.java 2443ms 23ms 101.0MB 8710ms 50ms graal/jvm 17.0.8
nim 1.nim 3574ms 1.3ms 1.6MB 3563ms 0ms nim/clang 2.2.0
d 1.d 3581ms 0.9ms 4.0MB 3570ms 0ms ldc2 1.39.0
odin 1.odin 3584ms 3.5ms 2.9MB 3570ms 0ms odin 2024
wasm 2.rs 3587ms 3.9ms 37.2MB 3573ms 3ms wasmer/llvm 5.0.2
wasm 2.rs 3589ms 8.6ms 18.9MB 3573ms 0ms wasmtime 27.0.0
nim 1.nim 3593ms 7.6ms 1.4MB 3583ms 0ms nim 2.2.0
wasm 7.rs 3597ms 1.9ms 38.9MB 3580ms 3ms wasmer/llvm 5.0.2
d 1.d 3647ms 53ms 5.9MB 3633ms 0ms dmd 2.109.1
zig 1.zig 3670ms 5.0ms 1.5MB 3663ms 0ms zig 0.13.0
go 1.go 3680ms 35ms 5.4MB 3673ms 0ms go 1.23.3
chapel 1.chpl 3709ms 10.0ms 32.8MB 3703ms 0ms chpl 1.31.0
dart 1.dart 3848ms 84ms 6.4MB 3837ms 0ms dart/exe 3.5.4
crystal 1.cr 3904ms 21ms 4.6MB 3893ms 0ms crystal 1.14.0
haxe 1.hx 3912ms 9.7ms 5.2MB 3900ms 0ms haxe/hl/c 4.3.6
lua 1.lua 4048ms 11ms 2.5MB 4037ms 0ms luajit 2.1.0-beta3
typescript 7.ts 4067ms 49ms 60.3MB 4053ms 7ms deno 2.1.2
rust 2.rs 4203ms 9.7ms 2.0MB 4193ms 0ms rustc 1.83.0
dart 2.dart 4213ms 3.0ms 6.1MB 4203ms 0ms dart/exe 3.5.4
ocaml 2.ml 4487ms 17ms 6.6MB 4477ms 0ms ocaml 5.2.1
csharp 3-m.cs 4666ms 74ms 28.5MB 17763ms 20ms mono 6.12.0
wasm 7.rs 4874ms 3.3ms 20.7MB 4857ms 0ms wasmtime 27.0.0
go 1.go timeout 0.0ms 0.5MB 4990ms 0ms tinygo 0.34.0
haxe 1.hx timeout 0.0ms 6.9MB 4980ms 3ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 5.8MB 4983ms 0ms haxe/hl/jit 1.14.0
lua 1.lua timeout 0.0ms 2.5MB 4990ms 0ms lua 5.4.7
perl 4.pl timeout 0.0ms 14.0MB 19700ms 13ms perl 5.40.0
python 8.py timeout 0.0ms 16.7MB 53ms 10ms cpython 3.13.0
python 8.py timeout 0.0ms 100.0MB 833ms 137ms pypy 3.10.14
python 8.py timeout 0.0ms 18.2MB 70ms 13ms pyston 3.8.12
ruby 4.rb timeout 0.0ms 28.1MB 4970ms 20ms ruby 3.3.6
ruby 4.rb timeout 0.0ms 28.3MB 4967ms 17ms ruby/yjit 3.3.6
ruby 4.rb timeout 0.0ms 455.7MB 5143ms 237ms truffleruby 24.1.1
v 1.v timeout 0.0ms 3.0MB 4990ms 0ms v/clang+gc 0.4.8
v 1.v timeout 0.0ms 1.6MB 4990ms 0ms v/clang 0.4.8

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2-m.zig 125ms 0.4ms 3.7MB 273ms 7ms zig 0.13.0
cpp 8-m.cpp 126ms 0.4ms 7.4MB 450ms 3ms clang++ 14.0.0-1ubuntu1.1
rust 8-m.rs 128ms 0.4ms 6.2MB 470ms 3ms rustc 1.85.0-nightly
rust 7-m.rs 129ms 0.5ms 6.1MB 463ms 7ms rustc 1.83.0
cpp 8-m.cpp 133ms 6.0ms 4.1MB 487ms 0ms g++ 11.4.0
zig 2.zig 230ms 0.8ms 1.4MB 220ms 0ms zig 0.13.0
cpp 6-im.cpp 240ms 3.2ms 7.4MB 900ms 0ms clang++ 14.0.0-1ubuntu1.1
cpp 6-im.cpp 240ms 0.9ms 4.1MB 907ms 3ms g++ 11.4.0
c 6-im.c 251ms 2.9ms 4.0MB 953ms 0ms gcc 14.2.0
c 4-m.c 253ms 1.2ms 4.1MB 957ms 0ms gcc 14.2.0
rust 8.rs 255ms 1.5ms 2.3MB 243ms 0ms rustc 1.85.0-nightly
c 6-im.c 261ms 3.2ms 7.2MB 973ms 0ms clang 14.0.0-1ubuntu1.1
c 5-im.c 290ms 11ms 4.0MB 1093ms 0ms gcc 14.2.0
c 4-m.c 291ms 2.9ms 5.4MB 1097ms 0ms clang 14.0.0-1ubuntu1.1
c 5-im.c 342ms 3.7ms 5.4MB 1313ms 0ms clang 14.0.0-1ubuntu1.1
csharp 3-m.cs 476ms 0.7ms 18.1MB 1800ms 0ms dotnet/aot 9.0.100
go 4-m.go 479ms 0.2ms 5.5MB 1817ms 3ms go 1.23.3
c 3-m.c 479ms 25ms 7.3MB 1803ms 10ms clang 14.0.0-1ubuntu1.1
rust 2-m.rs 492ms 0.5ms 4.1MB 1890ms 0ms rustc 1.83.0
chapel 1-m.chpl 496ms 1.0ms 32.8MB 960ms 0ms chpl 1.31.0
c 3-m.c 502ms 2.4ms 4.0MB 1950ms 0ms gcc 14.2.0
rust 7.rs 530ms 4.7ms 1.8MB 523ms 0ms rustc 1.83.0
java 2-m.java 595ms 4.1ms 49.1MB 2077ms 30ms openjdk 23
java 2-m.java 595ms 6.5ms 47.6MB 2087ms 20ms openjdk 21
javascript 6-m.js 643ms 4.2ms 117.0MB 2300ms 43ms node 23.3.0
java 2-m.java 718ms 4.6ms 47.3MB 2043ms 143ms openjdk/zgc 21
java 2-m.java 738ms 17ms 99.2MB 2487ms 33ms graal/jvm 17.0.8
csharp 3-m.cs 754ms 13ms 37.5MB 1653ms 30ms dotnet 9.0.100
nim 1.nim 896ms 0.8ms 1.5MB 887ms 0ms nim/clang 2.2.0
d 1.d 897ms 1.4ms 3.6MB 887ms 0ms ldc2 1.39.0
odin 1.odin 901ms 2.9ms 2.3MB 890ms 0ms odin 2024
nim 1.nim 904ms 3.3ms 1.3MB 893ms 0ms nim 2.2.0
wasm 2.rs 906ms 2.5ms 18.7MB 890ms 0ms wasmtime 27.0.0
wasm 2.rs 909ms 1.3ms 38.9MB 893ms 0ms wasmer/llvm 5.0.2
wasm 7.rs 909ms 0.8ms 39.0MB 893ms 0ms wasmer/llvm 5.0.2
d 1.d 909ms 3.9ms 5.3MB 897ms 0ms dmd 2.109.1
zig 1.zig 924ms 1.5ms 1.4MB 910ms 0ms zig 0.13.0
go 1.go 934ms 5.6ms 3.4MB 927ms 0ms go 1.23.3
chapel 1.chpl 946ms 5.3ms 32.8MB 937ms 7ms chpl 1.31.0
dart 1.dart 959ms 8.0ms 6.1MB 950ms 0ms dart/exe 3.5.4
crystal 1.cr 979ms 2.1ms 4.3MB 967ms 0ms crystal 1.14.0
haxe 1.hx 986ms 2.8ms 5.1MB 973ms 0ms haxe/hl/c 4.3.6
lua 1.lua 1016ms 1.5ms 2.4MB 1003ms 0ms luajit 2.1.0-beta3
typescript 7.ts 1036ms 4.2ms 61.8MB 1017ms 13ms deno 2.1.2
rust 2.rs 1051ms 1.9ms 1.9MB 1040ms 0ms rustc 1.83.0
dart 2.dart 1064ms 8.2ms 6.3MB 1053ms 0ms dart/exe 3.5.4
ocaml 2.ml 1126ms 6.0ms 5.9MB 1117ms 0ms ocaml 5.2.1
csharp 3-m.cs 1224ms 32ms 30.7MB 4513ms 7ms mono 6.12.0
wasm 7.rs 1233ms 11ms 18.7MB 1220ms 0ms wasmtime 27.0.0
v 1.v 1281ms 4.1ms 1.5MB 1273ms 0ms v/clang 0.4.8
v 1.v 1313ms 9.0ms 2.6MB 1300ms 0ms v/clang+gc 0.4.8
go 1.go 1390ms 1.4ms 0.4MB 1380ms 0ms tinygo 0.34.0
haxe 1.hx 2391ms 1.0ms 6.6MB 2377ms 0ms haxe/cpp 4.3.6
ruby 4.rb 4475ms 23ms 439.6MB 4760ms 200ms truffleruby 24.1.1
haxe 1.hx timeout 0.0ms 5.8MB 4980ms 7ms haxe/hl/jit 1.14.0
lua 1.lua timeout 0.0ms 2.3MB 4990ms 0ms lua 5.4.7
perl 4.pl timeout 0.0ms 14.3MB 19487ms 13ms perl 5.40.0
python 8.py timeout 0.0ms 16.4MB 93ms 30ms cpython 3.13.0
python 8.py timeout 0.0ms 99.8MB 1533ms 517ms pypy 3.10.14
python 8.py timeout 0.0ms 17.5MB 140ms 33ms pyston 3.8.12
ruby 4.rb timeout 0.0ms 28.0MB 4960ms 20ms ruby 3.3.6
ruby 4.rb timeout 0.0ms 28.3MB 4963ms 20ms ruby/yjit 3.3.6

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7-m.rs 36ms 0.2ms 4.1MB 107ms 0ms rustc 1.83.0
rust 8-m.rs 36ms 0.5ms 4.1MB 117ms 0ms rustc 1.85.0-nightly
zig 2-m.zig 38ms 0.6ms 3.7MB 37ms 0ms zig 0.13.0
cpp 8-m.cpp 38ms 0.8ms 9.1MB 110ms 3ms clang++ 14.0.0-1ubuntu1.1
cpp 8-m.cpp 39ms 0.5ms 4.0MB 123ms 0ms g++ 11.4.0
zig 2.zig 60ms 0.3ms 1.4MB 50ms 0ms zig 0.13.0
rust 8.rs 66ms 0.3ms 2.0MB 57ms 0ms rustc 1.85.0-nightly
cpp 6-im.cpp 67ms 0.2ms 7.4MB 220ms 0ms clang++ 14.0.0-1ubuntu1.1
c 6-im.c 72ms 0.5ms 7.0MB 243ms 0ms clang 14.0.0-1ubuntu1.1
c 4-m.c 74ms 3.3ms 4.1MB 257ms 0ms gcc 14.2.0
c 6-im.c 74ms 6.9ms 4.0MB 250ms 0ms gcc 14.2.0
cpp 6-im.cpp 79ms 17ms 4.0MB 260ms 0ms g++ 11.4.0
c 5-im.c 80ms 1.3ms 4.0MB 283ms 0ms gcc 14.2.0
c 4-m.c 82ms 2.6ms 7.0MB 277ms 0ms clang 14.0.0-1ubuntu1.1
c 5-im.c 95ms 3.2ms 5.2MB 333ms 3ms clang 14.0.0-1ubuntu1.1
c 3-m.c 124ms 1.2ms 5.3MB 450ms 0ms clang 14.0.0-1ubuntu1.1
go 4-m.go 126ms 0.7ms 5.4MB 447ms 0ms go 1.23.3
rust 2-m.rs 127ms 0.6ms 4.1MB 457ms 7ms rustc 1.83.0
csharp 3-m.cs 129ms 0.8ms 18.3MB 443ms 3ms dotnet/aot 9.0.100
c 3-m.c 134ms 0.3ms 4.0MB 497ms 0ms gcc 14.2.0
rust 7.rs 135ms 2.0ms 1.8MB 127ms 0ms rustc 1.83.0
chapel 1-m.chpl 140ms 0.3ms 32.9MB 243ms 3ms chpl 1.31.0
nim 1.nim 226ms 0.6ms 1.5MB 213ms 0ms nim/clang 2.2.0
d 1.d 227ms 0.3ms 3.3MB 220ms 0ms ldc2 1.39.0
nim 1.nim 228ms 1.3ms 1.3MB 220ms 0ms nim 2.2.0
odin 1.odin 228ms 1.8ms 1.9MB 220ms 0ms odin 2024
d 1.d 230ms 0.5ms 4.8MB 220ms 0ms dmd 2.109.1
zig 1.zig 232ms 0.9ms 1.4MB 220ms 0ms zig 0.13.0
wasm 2.rs 234ms 2.2ms 18.5MB 220ms 0ms wasmtime 27.0.0
go 1.go 234ms 4.3ms 3.4MB 223ms 0ms go 1.23.3
wasm 2.rs 238ms 1.1ms 38.9MB 227ms 0ms wasmer/llvm 5.0.2
java 2-m.java 238ms 1.1ms 47.6MB 670ms 33ms openjdk 21
wasm 7.rs 239ms 1.1ms 37.2MB 223ms 0ms wasmer/llvm 5.0.2
dart 1.dart 244ms 3.4ms 5.9MB 233ms 0ms dart/exe 3.5.4
java 2-m.java 246ms 2.6ms 48.9MB 710ms 23ms openjdk 23
crystal 1.cr 249ms 2.4ms 4.0MB 240ms 0ms crystal 1.14.0
csharp 3-m.cs 250ms 3.1ms 36.7MB 457ms 13ms dotnet 9.0.100
haxe 1.hx 251ms 2.6ms 5.0MB 243ms 0ms haxe/hl/c 4.3.6
chapel 1.chpl 257ms 3.3ms 32.8MB 247ms 0ms chpl 1.31.0
lua 1.lua 257ms 0.8ms 2.3MB 243ms 0ms luajit 2.1.0-beta3
javascript 6-m.js 262ms 0.7ms 112.9MB 813ms 47ms node 23.3.0
rust 2.rs 266ms 1.0ms 1.9MB 253ms 0ms rustc 1.83.0
dart 2.dart 274ms 2.7ms 6.1MB 263ms 0ms dart/exe 3.5.4
java 2-m.java 277ms 22ms 96.4MB 793ms 27ms graal/jvm 17.0.8
ocaml 2.ml 284ms 2.2ms 5.2MB 270ms 0ms ocaml 5.2.1
typescript 7.ts 287ms 1.5ms 62.1MB 267ms 17ms deno 2.1.2
wasm 7.rs 321ms 11ms 18.8MB 303ms 0ms wasmtime 27.0.0
v 1.v 324ms 1.5ms 1.5MB 310ms 0ms v/clang 0.4.8
v 1.v 334ms 1.2ms 2.5MB 323ms 0ms v/clang+gc 0.4.8
csharp 3-m.cs 345ms 2.9ms 28.4MB 1153ms 10ms mono 6.12.0
go 1.go 349ms 0.1ms 0.3MB 340ms 0ms tinygo 0.34.0
java 2-m.java 370ms 2.2ms 47.2MB 717ms 143ms openjdk/zgc 21
haxe 1.hx 600ms 0.8ms 5.4MB 583ms 0ms haxe/cpp 4.3.6
ruby 4.rb 1235ms 59ms 393.4MB 1547ms 143ms truffleruby 24.1.1
python 8-m.py 1973ms 18ms 95.1MB 6307ms 370ms pypy 3.10.14
haxe 1.hx 2304ms 7.8ms 5.7MB 2287ms 0ms haxe/hl/jit 1.14.0
perl 4-m.pl 3406ms 10ms 13.7MB 13160ms 7ms perl 5.40.0
lua 1.lua timeout 0.0ms 2.0MB 4990ms 0ms lua 5.4.7
python 8.py timeout 0.0ms 16.1MB 277ms 40ms cpython 3.13.0
python 8.py timeout 0.0ms 17.3MB 397ms 113ms pyston 3.8.12
ruby 4.rb timeout 0.0ms 28.1MB 4973ms 13ms ruby 3.3.6
ruby 4.rb timeout 0.0ms 28.3MB 4963ms 20ms ruby/yjit 3.3.6