Julia VS V benchmarks

Current benchmark data was generated on Wed Feb 08 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8171M 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.)

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 2.2ms 0.7ms 2.0MB 0ms 0ms v/clang+gc 0.3.3
v 1.v 3.4ms 2.4ms 2.1MB 0ms 0ms v/clang 0.3.3
julia 1.jl 236ms 5.1ms 167.8MB 138ms 110ms julia/aot 1.8.5
julia 1.jl 250ms 5.6ms 171.5MB 152ms 114ms julia 1.8.5

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 7.jl 646ms 1.6ms 168.0MB 587ms 163ms julia/aot 1.8.5
julia 7.jl 833ms 13ms 225.8MB 763ms 180ms julia 1.8.5
v 1.v 1064ms 6.8ms 2.3MB 1047ms 0ms v/clang 0.3.3
v 1.v 1085ms 27ms 2.2MB 1070ms 0ms v/clang+gc 0.3.3

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 109ms 0.9ms 2.3MB 100ms 0ms v/clang 0.3.3
v 1.v 110ms 0.1ms 2.3MB 100ms 0ms v/clang+gc 0.3.3
julia 7.jl 317ms 22ms 167.0MB 240ms 147ms julia/aot 1.8.5
julia 7.jl 526ms 2.9ms 227.5MB 423ms 200ms julia 1.8.5

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 519ms 11ms 156.1MB 467ms 163ms julia/aot 1.8.5
v 2.v 632ms 1.7ms 10.7MB 617ms 0ms v/clang 0.3.3
v 2.v 633ms 2.4ms 10.7MB 620ms 0ms v/clang+gc 0.3.3
julia 1.jl 636ms 7.2ms 203.7MB 587ms 150ms julia 1.8.5
v 1.v 950ms 56ms 41.3MB 927ms 10ms v/clang+gc 0.3.3
v 1.v 995ms 21ms 41.2MB 973ms 10ms v/clang 0.3.3

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 137ms 0.2ms 20.9MB 120ms 3ms v/clang 0.3.3
v 1.v 137ms 1.6ms 20.8MB 120ms 0ms v/clang+gc 0.3.3
v 2.v 149ms 0.7ms 4.0MB 140ms 0ms v/clang+gc 0.3.3
v 2.v 151ms 4.9ms 4.0MB 140ms 0ms v/clang 0.3.3
julia 1.jl 301ms 26ms 149.8MB 190ms 150ms julia/aot 1.8.5
julia 1.jl 405ms 6.3ms 197.2MB 327ms 180ms julia 1.8.5

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 1321ms 16ms 37.0MB 1293ms 7ms v/clang 0.3.3
v 1.v 1359ms 0.9ms 37.0MB 1337ms 7ms v/clang+gc 0.3.3
julia 4.jl 1444ms 14ms 241.6MB 1307ms 233ms julia 1.8.5

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 109ms 4.2ms 5.6MB 97ms 0ms v/clang 0.3.3
v 1.v 110ms 7.0ms 5.6MB 90ms 0ms v/clang+gc 0.3.3
julia 4.jl 392ms 4.3ms 225.4MB 323ms 170ms julia 1.8.5

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 1982ms 6.8ms 210.4MB 3410ms 180ms julia 1.8.5
v 1.v 3377ms 5.0ms 2.0MB 3363ms 0ms v/clang+gc 0.3.3
v 1.v 3398ms 1.4ms 2.0MB 3387ms 0ms v/clang 0.3.3

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 284ms 4.5ms 2.0MB 270ms 0ms v/clang+gc 0.3.3
v 1.v 291ms 11ms 1.9MB 273ms 0ms v/clang 0.3.3
julia 2-m.jl 674ms 29ms 211.1MB 830ms 190ms julia 1.8.5

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 747ms 13ms 2.0MB 730ms 0ms v/clang+gc 0.3.3
v 1.v 765ms 28ms 2.0MB 750ms 0ms v/clang 0.3.3
julia 7-m.jl 797ms 8.6ms 298.9MB 1077ms 200ms julia 1.8.5

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 79ms 1.4ms 2.2MB 70ms 0ms v/clang 0.3.3
v 1.v 80ms 3.4ms 2.2MB 67ms 0ms v/clang+gc 0.3.3
julia 7.jl 570ms 8.1ms 227.5MB 683ms 167ms julia 1.8.5

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 1412ms 8.8ms 274.1MB 1860ms 193ms julia 1.8.5

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 950ms 17ms 262.9MB 1040ms 200ms julia 1.8.5

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 856ms 22ms 178.0MB 807ms 157ms julia 1.8.5
julia 1.jl 1650ms 5.6ms 261.1MB 1530ms 227ms julia 1.8.5
v 1.v 4231ms 76ms 3.0MB 4203ms 7ms v/clang+gc 0.3.3
v 1.v timeout 0.0ms 4.1MB 4970ms 10ms v/clang 0.3.3
v 2.v timeout 0.0ms 3.1MB 4980ms 0ms v/clang+gc 0.3.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 418ms 15ms 175.4MB 353ms 170ms julia 1.8.5
julia 1.jl 1002ms 43ms 261.2MB 880ms 207ms julia 1.8.5
v 1.v 1065ms 28ms 2.8MB 1050ms 0ms v/clang+gc 0.3.3
v 1.v 1791ms 13ms 3.1MB 1773ms 0ms v/clang 0.3.3
v 2.v 2070ms 45ms 2.8MB 2057ms 0ms v/clang+gc 0.3.3

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 1489ms 28ms 193.8MB 2493ms 173ms julia 1.8.5
julia 3-m.jl 2607ms 78ms 208.5MB 4643ms 157ms julia 1.8.5
v 1.v timeout 0.0ms 2.9MB 4990ms 0ms v/clang 0.3.3
v 1.v timeout 0.0ms 2.8MB 4987ms 0ms v/clang+gc 0.3.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 682ms 15ms 194.1MB 940ms 170ms julia 1.8.5
julia 3-m.jl 1012ms 20ms 208.1MB 1503ms 173ms julia 1.8.5
v 1.v 1998ms 0.3ms 2.8MB 1987ms 0ms v/clang 0.3.3
v 1.v 1999ms 2.2ms 2.9MB 1990ms 0ms v/clang+gc 0.3.3

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2.jl 473ms 2.6ms 195.0MB 543ms 163ms julia 1.8.5
v 1.v 507ms 4.1ms 2.5MB 497ms 0ms v/clang+gc 0.3.3
v 1.v 512ms 11ms 2.5MB 497ms 0ms v/clang 0.3.3
julia 3.jl 600ms 8.7ms 208.4MB 713ms 183ms julia 1.8.5