Hack VS V benchmarks

Current benchmark data was generated on Wed Sep 28 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 1028ms 5.2ms 37.3MB 1007ms 7ms v/clang+gc 0.3.1
v 1.v 1031ms 10ms 37.2MB 1007ms 7ms v/clang 0.3.1
hacklang 1.hack timeout 0.0ms 0.0MB 0ms 0ms hhvm 4.169.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 111ms 2.3ms 5.6MB 100ms 0ms v/clang 0.3.1
v 1.v 111ms 1.1ms 5.6MB 100ms 0ms v/clang+gc 0.3.1
hacklang 1.hack 1619ms 2.3ms 193.4MB 1547ms 37ms hhvm 4.169.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
hacklang 1.hack 1958ms 3.9ms 175.2MB 1893ms 33ms hhvm 4.169.0
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang 0.3.1
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang+gc 0.3.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
hacklang 1.hack 959ms 9.6ms 175.8MB 893ms 30ms hhvm 4.169.0
v 1-m.v 2053ms 75ms 24.5MB 2157ms 1707ms v/clang+gc 0.3.1
v 1-m.v 2061ms 26ms 20.5MB 2050ms 1797ms v/clang 0.3.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 2.3ms 1.0ms 2.1MB 0ms 0ms v/clang+gc 0.3.1
v 1.v 2.9ms 2.0ms 2.1MB 0ms 0ms v/clang 0.3.1
hacklang 1.hack 770ms 5.4ms 171.3MB 714ms 26ms hhvm 4.169.0

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
hacklang 1.hack timeout 0.0ms 0.0MB 0ms 0ms hhvm 4.169.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
hacklang 1.hack 1787ms 4.2ms 201.0MB 1723ms 37ms hhvm 4.169.0