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

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
perl 1.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

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
perl 1.pl 2242ms 10ms 14.2MB 2227ms 0ms perl 5.36.0

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
perl 1.pl 4465ms 39ms 11.2MB 4450ms 0ms perl 5.36.0

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
perl 1.pl 468ms 15ms 6.7MB 457ms 0ms perl 5.36.0

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
perl 1.pl 3.7ms 2.3ms 5.0MB 0ms 0ms perl 5.36.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
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
perl 2.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

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
perl 2.pl 3225ms 26ms 6.4MB 3213ms 0ms perl 5.36.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
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
perl 4.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
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
perl 4.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

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
perl 4.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0