Chapel VS Wasm benchmarks

Current benchmark data was generated on Sun Jun 01 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 1744ms 15ms 33.9MB 1727ms 10ms wasmtime 33.0.0
wasm 3.rs 1791ms 35ms 49.9MB 1760ms 13ms wasmtime 33.0.0
wasm 4.rs 1806ms 5.3ms 33.9MB 1783ms 10ms wasmtime 33.0.0
chapel 4.chpl 1954ms 6.5ms 62.3MB 1947ms 0ms chpl 1.31.0
chapel 3.chpl 2047ms 28ms 60.3MB 2040ms 3ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 5.rs 170ms 3.5ms 20.1MB 160ms 0ms wasmtime 33.0.0
wasm 3.rs 174ms 3.4ms 21.9MB 160ms 0ms wasmtime 33.0.0
chapel 4.chpl 185ms 3.6ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 185ms 0.6ms 32.2MB 180ms 0ms chpl 1.31.0
wasm 4.rs 195ms 7.7ms 19.9MB 180ms 0ms wasmtime 33.0.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 1143ms 6.3ms 20.3MB 1130ms 0ms wasmtime 33.0.0
chapel 1-m.chpl 2211ms 79ms 480.1MB 4320ms 70ms chpl 1.31.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 81ms 1.2ms 18.6MB 70ms 0ms wasmtime 33.0.0
chapel 1-m.chpl 179ms 0.7ms 445.0MB 293ms 40ms chpl 1.31.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 71ms 1.5ms 32.5MB 70ms 0ms chpl 1.31.0
wasm 1.rs 416ms 1.6ms 19.6MB 403ms 0ms wasmtime 33.0.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 33ms 2.6ms 30.5MB 30ms 0ms chpl 1.31.0
wasm 1.rs 114ms 2.6ms 19.0MB 100ms 0ms wasmtime 33.0.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 104ms 1.5ms 28.3MB 190ms 0ms chpl 1.31.0
wasm 1.rs 232ms 1.5ms 18.0MB 217ms 0ms wasmtime 33.0.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 21ms 0.7ms 28.4MB 20ms 0ms chpl 1.31.0
wasm 1.rs 31ms 0.6ms 18.0MB 20ms 0ms wasmtime 33.0.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 6.2ms 0.3ms 15.3MB 0ms 0ms wasmtime 33.0.0
chapel 1.chpl 9.3ms 1.5ms 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 747ms 5.4ms 87.2MB 1417ms 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 113ms 1.0ms 87.0MB 200ms 0ms chpl 1.31.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 322ms 1.7ms 28.8MB 320ms 0ms chpl 1.31.0
wasm 1.rs 404ms 2.3ms 18.1MB 390ms 0ms wasmtime 33.0.0
wasm 2.rs 565ms 4.4ms 18.1MB 547ms 0ms wasmtime 33.0.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 44ms 1.3ms 28.9MB 40ms 0ms chpl 1.31.0
wasm 1.rs 48ms 1.3ms 18.1MB 37ms 0ms wasmtime 33.0.0
wasm 2.rs 64ms 1.1ms 18.4MB 50ms 0ms wasmtime 33.0.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 444ms 0.7ms 30.4MB 440ms 0ms chpl 1.31.0
wasm 2.rs 2212ms 2.7ms 21.0MB 2197ms 0ms wasmtime 33.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 113ms 1.8ms 30.4MB 110ms 0ms chpl 1.31.0
wasm 2.rs 524ms 4.1ms 18.3MB 513ms 0ms wasmtime 33.0.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1387ms 3.3ms 220.1MB 1343ms 40ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 163ms 3.8ms 49.0MB 143ms 13ms chpl 1.31.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1181ms 6.5ms 29.1MB 1177ms 0ms chpl 1.31.0
wasm 1.rs 3519ms 16ms 17.8MB 3510ms 0ms wasmtime 33.0.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 307ms 4.2ms 29.1MB 303ms 0ms chpl 1.31.0
wasm 1.rs 883ms 5.2ms 17.8MB 870ms 0ms wasmtime 33.0.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1922ms 11ms 29.0MB 3817ms 0ms chpl 1.31.0
wasm 2.rs 3597ms 4.4ms 17.7MB 3583ms 0ms wasmtime 33.0.0
chapel 1.chpl 3716ms 4.8ms 28.8MB 3710ms 0ms chpl 1.31.0
wasm 7.rs 4900ms 7.4ms 17.7MB 4887ms 0ms wasmtime 33.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 492ms 1.0ms 28.9MB 957ms 0ms chpl 1.31.0
wasm 2.rs 905ms 1.7ms 18.2MB 890ms 0ms wasmtime 33.0.0
chapel 1.chpl 940ms 1.7ms 28.8MB 940ms 0ms chpl 1.31.0
wasm 7.rs 1229ms 2.0ms 17.7MB 1217ms 0ms wasmtime 33.0.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 133ms 1.1ms 28.9MB 240ms 0ms chpl 1.31.0
wasm 2.rs 233ms 1.4ms 18.3MB 220ms 0ms wasmtime 33.0.0
chapel 1.chpl 246ms 3.6ms 28.8MB 240ms 0ms chpl 1.31.0
wasm 7.rs 315ms 1.6ms 17.7MB 300ms 0ms wasmtime 33.0.0