Chapel VS Javascript benchmarks

Current benchmark data was generated on Mon Dec 30 2024, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -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
javascript 1-m.js 948ms 19ms 199.4MB 1457ms 273ms bun 1.1.42
javascript 1-m.js 1223ms 9.8ms 294.3MB 2110ms 150ms node 23.5.0
chapel 4.chpl 1953ms 6.1ms 66.3MB 1937ms 7ms chpl 1.31.0
chapel 3.chpl 2024ms 5.9ms 66.3MB 2007ms 7ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 96ms 2.2ms 78.6MB 67ms 33ms bun 1.1.42
javascript 1.js 124ms 2.0ms 82.5MB 120ms 33ms node 23.5.0
chapel 4.chpl 191ms 1.6ms 36.4MB 177ms 3ms chpl 1.31.0
chapel 3.chpl 194ms 1.4ms 36.4MB 187ms 0ms chpl 1.31.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 1578ms 6.8ms 94.6MB 1660ms 50ms node 23.5.0
javascript 1.js 2195ms 13ms 99.3MB 2210ms 63ms bun 1.1.42
chapel 1-m.chpl 2294ms 56ms 508.1MB 4467ms 67ms chpl 1.31.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 154ms 1.5ms 76.7MB 143ms 17ms node 23.5.0
javascript 1.js 181ms 3.1ms 85.1MB 203ms 27ms bun 1.1.42
chapel 1-m.chpl 189ms 0.8ms 418.9MB 300ms 37ms chpl 1.31.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 79ms 0.3ms 36.5MB 67ms 3ms chpl 1.31.0
javascript 1.js 270ms 2.7ms 69.0MB 283ms 23ms node 23.5.0
javascript 1.js 718ms 5.1ms 76.4MB 690ms 23ms bun 1.1.42

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 40ms 0.5ms 34.5MB 30ms 0ms chpl 1.31.0
javascript 1.js 125ms 2.5ms 65.6MB 140ms 13ms node 23.5.0
javascript 1.js 524ms 4.8ms 66.2MB 503ms 13ms bun 1.1.42

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 112ms 0.8ms 32.4MB 197ms 0ms chpl 1.31.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 28ms 0.3ms 32.4MB 17ms 3ms chpl 1.31.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 12ms 0.6ms 31.5MB 10ms 0ms bun 1.1.42
chapel 1.chpl 17ms 2.0ms 32.8MB 10ms 0ms chpl 1.31.0
javascript 1.js 31ms 0.3ms 51.9MB 14ms 6ms node 23.5.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 747ms 2.4ms 90.9MB 1403ms 7ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 121ms 0.7ms 80.9MB 200ms 3ms chpl 1.31.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 329ms 2.7ms 32.9MB 317ms 3ms chpl 1.31.0
javascript 6.js 455ms 3.5ms 59.6MB 440ms 7ms node 23.5.0
javascript 6.js 659ms 1.5ms 44.6MB 657ms 7ms bun 1.1.42

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 51ms 0.3ms 32.8MB 40ms 3ms chpl 1.31.0
javascript 6.js 76ms 0.7ms 59.8MB 63ms 7ms node 23.5.0
javascript 6.js 87ms 0.3ms 44.6MB 77ms 7ms bun 1.1.42

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 450ms 0.3ms 32.4MB 440ms 0ms chpl 1.31.0
javascript 3.js timeout 0.0ms 92.1MB 4983ms 23ms node 23.5.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 121ms 0.6ms 34.4MB 110ms 7ms chpl 1.31.0
javascript 3.js 1085ms 5.9ms 74.8MB 1063ms 17ms node 23.5.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1393ms 10ms 224.2MB 1353ms 33ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 169ms 1.9ms 52.9MB 150ms 10ms chpl 1.31.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1184ms 7.2ms 33.0MB 1177ms 0ms chpl 1.31.0
javascript 1.js 2480ms 11ms 64.4MB 2493ms 10ms node 23.5.0
javascript 1.js 2760ms 36ms 83.0MB 2793ms 37ms bun 1.1.42

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 319ms 14ms 33.0MB 313ms 0ms chpl 1.31.0
javascript 1.js 657ms 7.0ms 61.8MB 663ms 13ms node 23.5.0
javascript 1.js 718ms 2.9ms 82.6MB 703ms 37ms bun 1.1.42

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1923ms 22ms 32.9MB 3807ms 3ms chpl 1.31.0
javascript 6-m.js 2147ms 4.1ms 116.2MB 8220ms 60ms node 23.5.0
chapel 1.chpl 3722ms 3.1ms 32.8MB 3713ms 0ms chpl 1.31.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 497ms 2.1ms 32.9MB 957ms 0ms chpl 1.31.0
javascript 6-m.js 639ms 4.2ms 115.4MB 2287ms 50ms node 23.5.0
chapel 1.chpl 946ms 5.0ms 32.8MB 937ms 7ms chpl 1.31.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 141ms 0.2ms 32.9MB 247ms 0ms chpl 1.31.0
chapel 1.chpl 254ms 2.0ms 32.8MB 243ms 0ms chpl 1.31.0
javascript 6-m.js 261ms 2.9ms 113.2MB 807ms 37ms node 23.5.0