OCaml VS Chapel 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
chapel 4.chpl 2319ms 53ms 64.2MB 2293ms 17ms chpl 1.27.0
chapel 3.chpl 2420ms 6.9ms 46.5MB 2393ms 17ms chpl 1.27.0
ocaml 1.ml 3974ms 21ms 120.8MB 3930ms 23ms ocaml 4.14.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 4.chpl 220ms 0.7ms 32.1MB 203ms 7ms chpl 1.27.0
chapel 3.chpl 223ms 0.5ms 16.1MB 213ms 0ms chpl 1.27.0
ocaml 1.ml 268ms 4.6ms 17.4MB 253ms 0ms ocaml 4.14.0

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 2.ml 3925ms 2.1ms 2.6MB 3910ms 0ms ocaml 4.14.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 2.ml 328ms 2.0ms 2.6MB 320ms 0ms ocaml 4.14.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 148ms 2.1ms 32.0MB 253ms 0ms chpl 1.27.0
ocaml 6.ml 423ms 0.6ms 24.5MB 410ms 0ms ocaml 4.14.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 33ms 1.1ms 32.0MB 37ms 0ms chpl 1.27.0
ocaml 6.ml 49ms 2.6ms 6.0MB 33ms 0ms ocaml 4.14.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 2.2ms 0.6ms 2.6MB 0ms 0ms ocaml 4.14.0
chapel 1.chpl 19ms 2.4ms 32.4MB 4ms 6ms chpl 1.27.0

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 238ms 0.6ms 5.9MB 227ms 0ms ocaml 4.14.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 708ms 0.9ms 5.9MB 697ms 0ms ocaml 4.14.0

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 104ms 0.6ms 5.0MB 90ms 0ms ocaml 4.14.0

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 1490ms 8.9ms 62.6MB 1450ms 23ms ocaml 4.14.0
ocaml 2.ml 2549ms 8.8ms 71.5MB 2527ms 7ms ocaml 4.14.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 188ms 0.6ms 18.6MB 173ms 0ms ocaml 4.14.0
ocaml 2.ml 426ms 1.7ms 23.5MB 407ms 7ms ocaml 4.14.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 361ms 0.2ms 32.4MB 353ms 0ms chpl 1.27.0
ocaml 1.ml 469ms 0.4ms 2.6MB 457ms 0ms ocaml 4.14.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 51ms 3.2ms 2.4MB 40ms 0ms ocaml 4.14.0
chapel 2.chpl 56ms 0.9ms 32.4MB 43ms 3ms chpl 1.27.0

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 2004ms 26ms 555.9MB 1887ms 103ms ocaml 4.14.0
ocaml 2.ml 2262ms 1.0ms 20.1MB 2250ms 0ms ocaml 4.14.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 380ms 3.5ms 142.3MB 347ms 13ms ocaml 4.14.0
ocaml 2.ml 548ms 0.4ms 8.4MB 537ms 0ms ocaml 4.14.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 2002ms 36ms 253.4MB 1867ms 123ms chpl 1.27.0
ocaml 2.ml timeout 0.0ms 0.0MB 0ms 0ms ocaml 4.14.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 220ms 0.4ms 56.8MB 197ms 10ms chpl 1.27.0
ocaml 2.ml 682ms 4.2ms 50.9MB 653ms 13ms ocaml 4.14.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 2298ms 91ms 32.5MB 4440ms 7ms chpl 1.27.0
chapel 1.chpl 4377ms 4.9ms 32.5MB 4360ms 3ms chpl 1.27.0
ocaml 2.ml timeout 0.0ms 0.0MB 0ms 0ms ocaml 4.14.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 579ms 0.5ms 32.5MB 1113ms 3ms chpl 1.27.0
chapel 1.chpl 1111ms 1.2ms 32.4MB 1100ms 0ms chpl 1.27.0
ocaml 2.ml 1647ms 1.4ms 3.4MB 1640ms 0ms ocaml 4.14.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 165ms 1.6ms 32.5MB 290ms 0ms chpl 1.27.0
chapel 1.chpl 297ms 2.5ms 32.4MB 283ms 7ms chpl 1.27.0
ocaml 2.ml 415ms 0.4ms 3.5MB 403ms 0ms ocaml 4.14.0