Chapel VS Javascript benchmarks

Current benchmark data was generated on Mon Mar 31 2025, 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 1005ms 34ms 179.3MB 1543ms 267ms bun 1.2.7
javascript 1-m.js 1224ms 3.5ms 250.8MB 2130ms 153ms node 23.10.0
chapel 4.chpl 1962ms 44ms 60.3MB 1950ms 0ms chpl 1.31.0
chapel 3.chpl 2019ms 12ms 60.3MB 2010ms 0ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 100ms 0.5ms 79.1MB 73ms 27ms bun 1.2.7
javascript 1.js 126ms 0.7ms 78.8MB 130ms 23ms node 23.10.0
chapel 4.chpl 185ms 1.2ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 2.8ms 32.4MB 180ms 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 1662ms 72ms 90.2MB 1733ms 57ms node 23.10.0
chapel 1-m.chpl 2192ms 58ms 470.2MB 4273ms 73ms chpl 1.31.0
javascript 1.js 2500ms 20ms 101.3MB 2520ms 70ms bun 1.2.7

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 158ms 4.4ms 72.7MB 143ms 27ms node 23.10.0
chapel 1-m.chpl 181ms 1.3ms 427.0MB 293ms 37ms chpl 1.31.0
javascript 1.js 199ms 0.9ms 88.4MB 220ms 33ms bun 1.2.7

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 71ms 3.7ms 32.4MB 70ms 0ms chpl 1.31.0
javascript 1.js 285ms 4.3ms 63.7MB 300ms 27ms node 23.10.0
javascript 1.js 526ms 4.8ms 78.0MB 497ms 20ms bun 1.2.7

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 32ms 1.2ms 30.5MB 30ms 0ms chpl 1.31.0
javascript 1.js 144ms 12ms 62.0MB 160ms 20ms node 23.10.0
javascript 1.js 500ms 3.9ms 67.7MB 470ms 23ms bun 1.2.7

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 104ms 1.2ms 28.4MB 190ms 0ms chpl 1.31.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 22ms 2.2ms 28.4MB 20ms 0ms chpl 1.31.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 11ms 0.5ms 28.8MB 0ms 0ms chpl 1.31.0
javascript 1.js 13ms 0.3ms 33.3MB 0ms 0ms bun 1.2.7
javascript 1.js 31ms 0.3ms 47.9MB 18ms 2ms node 23.10.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 746ms 3.8ms 97.0MB 1413ms 10ms 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 112ms 0.7ms 76.9MB 197ms 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 319ms 3.7ms 28.8MB 313ms 0ms chpl 1.31.0
javascript 6.js 458ms 4.1ms 55.9MB 447ms 10ms node 23.10.0
javascript 6.js 780ms 18ms 46.1MB 773ms 0ms bun 1.2.7

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 45ms 0.9ms 28.9MB 40ms 0ms chpl 1.31.0
javascript 6.js 79ms 1.0ms 56.2MB 67ms 10ms node 23.10.0
javascript 6.js 98ms 1.2ms 46.3MB 93ms 7ms bun 1.2.7

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 442ms 11ms 30.3MB 437ms 0ms chpl 1.31.0
javascript 3.js timeout 0.0ms 87.9MB 4983ms 27ms node 23.10.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 113ms 0.5ms 30.4MB 110ms 0ms chpl 1.31.0
javascript 3.js 1099ms 2.6ms 70.8MB 1080ms 17ms node 23.10.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1382ms 4.7ms 222.1MB 1337ms 37ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 159ms 3.1ms 48.9MB 140ms 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 1172ms 4.9ms 29.2MB 1167ms 0ms chpl 1.31.0
javascript 1.js 2521ms 12ms 59.2MB 2527ms 30ms node 23.10.0
javascript 1.js 2842ms 3.4ms 84.8MB 2857ms 50ms bun 1.2.7

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 314ms 9.4ms 29.2MB 310ms 0ms chpl 1.31.0
javascript 1.js 671ms 1.0ms 57.7MB 677ms 13ms node 23.10.0
javascript 1.js 745ms 4.9ms 84.5MB 740ms 33ms bun 1.2.7

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1917ms 12ms 28.9MB 3807ms 0ms chpl 1.31.0
javascript 6-m.js 2181ms 15ms 114.1MB 8247ms 60ms node 23.10.0
chapel 1.chpl 3719ms 32ms 28.8MB 3710ms 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 489ms 4.6ms 29.0MB 953ms 0ms chpl 1.31.0
javascript 6-m.js 656ms 7.6ms 113.5MB 2320ms 53ms node 23.10.0
chapel 1.chpl 934ms 6.5ms 28.8MB 927ms 0ms chpl 1.31.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 134ms 2.1ms 28.9MB 240ms 0ms chpl 1.31.0
chapel 1.chpl 248ms 6.1ms 28.8MB 243ms 0ms chpl 1.31.0
javascript 6-m.js 266ms 1.5ms 109.7MB 813ms 50ms node 23.10.0