Chapel VS Wasm benchmarks

Current benchmark data was generated on Mon Jun 23 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
wasm 5.rs 1914ms 16ms 35.7MB 1893ms 10ms wasmtime 34.0.0
wasm 4.rs 1932ms 53ms 33.7MB 1910ms 10ms wasmtime 34.0.0
chapel 4.chpl 1973ms 34ms 62.3MB 1967ms 0ms chpl 1.31.0
wasm 3.rs 1979ms 111ms 50.0MB 1950ms 20ms wasmtime 34.0.0
chapel 3.chpl 2236ms 21ms 62.4MB 2227ms 0ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 5.rs 172ms 1.4ms 19.8MB 157ms 0ms wasmtime 34.0.0
wasm 4.rs 174ms 2.0ms 19.8MB 163ms 0ms wasmtime 34.0.0
wasm 3.rs 181ms 4.1ms 21.7MB 163ms 0ms wasmtime 34.0.0
chapel 4.chpl 185ms 1.3ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 3.2ms 32.4MB 183ms 0ms chpl 1.31.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 1130ms 4.9ms 20.1MB 1113ms 7ms wasmtime 34.0.0
chapel 1-m.chpl 2341ms 58ms 699.6MB 4543ms 103ms chpl 1.31.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 80ms 1.0ms 18.6MB 70ms 0ms wasmtime 34.0.0
chapel 1-m.chpl 211ms 12ms 658.0MB 330ms 60ms chpl 1.31.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 72ms 1.7ms 32.5MB 70ms 0ms chpl 1.31.0
wasm 1.rs 418ms 0.4ms 19.3MB 403ms 0ms wasmtime 34.0.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 33ms 1.6ms 30.5MB 30ms 0ms chpl 1.31.0
wasm 1.rs 116ms 0.9ms 18.8MB 103ms 0ms wasmtime 34.0.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 109ms 1.6ms 28.4MB 197ms 0ms chpl 1.31.0
wasm 1.rs 234ms 1.9ms 19.6MB 220ms 0ms wasmtime 34.0.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 23ms 1.5ms 28.4MB 20ms 0ms chpl 1.31.0
wasm 1.rs 32ms 0.8ms 17.7MB 20ms 0ms wasmtime 34.0.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 7.1ms 0.1ms 16.7MB 0ms 0ms wasmtime 34.0.0
chapel 1.chpl 11ms 0.4ms 28.8MB 0ms 0ms chpl 1.31.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 762ms 5.2ms 99.0MB 1443ms 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 116ms 1.6ms 87.0MB 203ms 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 325ms 1.9ms 26.6MB 320ms 0ms chpl 1.31.0
wasm 1.rs 404ms 1.2ms 17.7MB 390ms 0ms wasmtime 34.0.0
wasm 2.rs 562ms 1.1ms 17.8MB 550ms 0ms wasmtime 34.0.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 46ms 1.1ms 28.8MB 40ms 0ms chpl 1.31.0
wasm 1.rs 49ms 0.5ms 17.9MB 37ms 0ms wasmtime 34.0.0
wasm 2.rs 66ms 1.6ms 18.0MB 50ms 0ms wasmtime 34.0.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 447ms 1.6ms 30.4MB 440ms 0ms chpl 1.31.0
wasm 2.rs 2220ms 15ms 18.7MB 2203ms 0ms wasmtime 34.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 114ms 0.9ms 30.4MB 110ms 0ms chpl 1.31.0
wasm 2.rs 523ms 2.7ms 18.4MB 510ms 0ms wasmtime 34.0.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1401ms 0.9ms 220.3MB 1350ms 43ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 168ms 2.2ms 49.0MB 147ms 20ms chpl 1.31.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1180ms 4.7ms 29.1MB 1173ms 0ms chpl 1.31.0
wasm 1.rs 3588ms 10ms 17.7MB 3573ms 0ms wasmtime 34.0.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 305ms 1.3ms 29.0MB 300ms 0ms chpl 1.31.0
wasm 1.rs 900ms 5.2ms 18.0MB 887ms 0ms wasmtime 34.0.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1915ms 3.4ms 28.9MB 3803ms 0ms chpl 1.31.0
wasm 2.rs 3609ms 13ms 17.7MB 3590ms 0ms wasmtime 34.0.0
chapel 1.chpl 3721ms 7.6ms 28.8MB 3713ms 0ms chpl 1.31.0
wasm 7.rs 4900ms 13ms 17.7MB 4887ms 0ms wasmtime 34.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 491ms 1.8ms 28.9MB 957ms 0ms chpl 1.31.0
wasm 2.rs 908ms 2.9ms 19.5MB 893ms 0ms wasmtime 34.0.0
chapel 1.chpl 956ms 29ms 28.8MB 953ms 0ms chpl 1.31.0
wasm 7.rs 1231ms 2.5ms 18.1MB 1220ms 0ms wasmtime 34.0.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 135ms 1.0ms 28.9MB 243ms 0ms chpl 1.31.0
wasm 2.rs 234ms 0.4ms 17.8MB 220ms 0ms wasmtime 34.0.0
chapel 1.chpl 248ms 1.5ms 28.8MB 240ms 0ms chpl 1.31.0
wasm 7.rs 316ms 2.7ms 17.4MB 300ms 0ms wasmtime 34.0.0