Julia VS V benchmarks

Current benchmark data was generated on Thu Sep 22 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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 1.7ms 0.4ms 2.1MB 0ms 0ms v/clang 0.3.1
v 1.v 1.9ms 0.8ms 1.9MB 0ms 0ms v/clang+gc 0.3.1
julia 1.jl 197ms 0.7ms 187.2MB 124ms 86ms julia 1.8.1
julia 1.jl 205ms 48ms 178.5MB 114ms 86ms julia/aot 1.8.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 7.jl 554ms 1.2ms 180.3MB 510ms 120ms julia/aot 1.8.1
julia 7.jl 715ms 1.2ms 245.9MB 680ms 110ms julia 1.8.1
v 1.v 1016ms 2.0ms 2.4MB 1000ms 0ms v/clang+gc 0.3.1
v 1.v 1018ms 1.0ms 2.3MB 1010ms 0ms v/clang 0.3.1

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 105ms 0.8ms 2.3MB 97ms 0ms v/clang+gc 0.3.1
v 1.v 108ms 3.2ms 2.4MB 97ms 0ms v/clang 0.3.1
julia 7.jl 285ms 60ms 182.1MB 203ms 127ms julia/aot 1.8.1
julia 7.jl 405ms 0.7ms 245.8MB 343ms 143ms julia 1.8.1

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 427ms 1.7ms 175.5MB 410ms 97ms julia/aot 1.8.1
v 2.v 498ms 1.9ms 7.0MB 487ms 0ms v/clang+gc 0.3.1
v 2.v 502ms 2.9ms 10.5MB 483ms 0ms v/clang 0.3.1
julia 1.jl 538ms 1.0ms 220.4MB 510ms 110ms julia 1.8.1
v 1.v 696ms 11ms 41.3MB 677ms 3ms v/clang 0.3.1
v 1.v 721ms 25ms 41.2MB 700ms 3ms v/clang+gc 0.3.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 2.v 116ms 0.7ms 3.3MB 110ms 0ms v/clang+gc 0.3.1
v 1.v 118ms 1.1ms 19.3MB 100ms 0ms v/clang+gc 0.3.1
v 2.v 119ms 2.1ms 3.3MB 103ms 0ms v/clang 0.3.1
v 1.v 119ms 0.5ms 19.5MB 100ms 0ms v/clang 0.3.1
julia 1.jl 239ms 30ms 169.1MB 187ms 87ms julia/aot 1.8.1
julia 1.jl 336ms 1.0ms 211.2MB 310ms 107ms julia 1.8.1

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 1105ms 2.5ms 37.1MB 1087ms 3ms v/clang+gc 0.3.1
v 1.v 1112ms 10ms 37.1MB 1093ms 3ms v/clang 0.3.1
julia 4.jl 1155ms 55ms 258.8MB 1073ms 157ms julia 1.8.1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 111ms 0.4ms 5.6MB 100ms 0ms v/clang 0.3.1
v 1.v 112ms 1.4ms 5.6MB 100ms 0ms v/clang+gc 0.3.1
julia 4.jl 307ms 1.6ms 240.5MB 250ms 133ms julia 1.8.1

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 1825ms 22ms 230.2MB 3183ms 130ms julia 1.8.1
v 1.v 3314ms 2.4ms 1.9MB 3300ms 0ms v/clang 0.3.1
v 1.v 3315ms 14ms 2.0MB 3303ms 0ms v/clang+gc 0.3.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 277ms 1.3ms 1.9MB 267ms 0ms v/clang 0.3.1
v 1.v 277ms 0.8ms 2.0MB 267ms 0ms v/clang+gc 0.3.1
julia 2-m.jl 555ms 1.4ms 230.5MB 700ms 133ms julia 1.8.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 576ms 0.4ms 2.3MB 563ms 0ms v/clang+gc 0.3.1
v 1.v 577ms 0.2ms 2.3MB 560ms 0ms v/clang 0.3.1
julia 7-m.jl 636ms 1.4ms 299.2MB 890ms 133ms julia 1.8.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 62ms 1.7ms 2.2MB 50ms 0ms v/clang 0.3.1
v 1.v 62ms 0.5ms 2.2MB 50ms 0ms v/clang+gc 0.3.1
julia 7.jl 460ms 1.4ms 228.1MB 557ms 113ms julia 1.8.1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 1162ms 1.6ms 318.3MB 1493ms 167ms julia 1.8.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 817ms 3.9ms 303.8MB 927ms 123ms julia 1.8.1

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 793ms 3.9ms 196.0MB 767ms 100ms julia 1.8.1
julia 1.jl 1425ms 3.7ms 276.0MB 1337ms 170ms julia 1.8.1
v 1.v 4690ms 44ms 3.3MB 4670ms 10ms v/clang+gc 0.3.1
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang 0.3.1
v 2.v timeout 0.0ms 0.0MB 0ms 0ms v/clang+gc 0.3.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 349ms 1.4ms 193.8MB 310ms 120ms julia 1.8.1
julia 1.jl 801ms 26ms 277.4MB 707ms 157ms julia 1.8.1
v 1.v 1172ms 2.0ms 2.5MB 1153ms 0ms v/clang+gc 0.3.1
v 2.v 1482ms 14ms 3.1MB 1470ms 0ms v/clang+gc 0.3.1
v 1.v 1592ms 28ms 3.0MB 1577ms 3ms v/clang 0.3.1

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 1373ms 2.1ms 205.1MB 2407ms 117ms julia 1.8.1
julia 3-m.jl 2069ms 3.9ms 220.3MB 3703ms 130ms julia 1.8.1
v 1.v 4121ms 1.0ms 2.8MB 4110ms 0ms v/clang 0.3.1
v 1.v 4122ms 2.2ms 2.9MB 4110ms 0ms v/clang+gc 0.3.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 582ms 1.2ms 206.8MB 873ms 103ms julia 1.8.1
julia 3-m.jl 795ms 4.6ms 219.1MB 1213ms 120ms julia 1.8.1
v 1.v 1033ms 0.4ms 2.6MB 1020ms 0ms v/clang 0.3.1
v 1.v 1033ms 1.1ms 2.6MB 1020ms 0ms v/clang+gc 0.3.1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 261ms 0.4ms 2.6MB 250ms 0ms v/clang 0.3.1
v 1.v 261ms 0.4ms 2.6MB 250ms 0ms v/clang+gc 0.3.1
julia 2-m.jl 385ms 1.0ms 204.8MB 477ms 107ms julia 1.8.1
julia 3.jl 476ms 2.8ms 220.2MB 580ms 130ms julia 1.8.1