Chapel VS Wasm benchmarks

Current benchmark data was generated on Tue Mar 25 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 1828ms 60ms 33.1MB 1810ms 10ms wasmtime 31.0.0
wasm 4.rs 1855ms 21ms 33.1MB 1833ms 10ms wasmtime 31.0.0
wasm 3.rs 1870ms 21ms 49.2MB 1847ms 10ms wasmtime 31.0.0
chapel 3.chpl 2069ms 6.5ms 60.3MB 2057ms 0ms chpl 1.31.0
chapel 4.chpl 2076ms 200ms 62.2MB 2063ms 3ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 5.rs 171ms 2.0ms 19.2MB 160ms 0ms wasmtime 31.0.0
wasm 4.rs 179ms 1.6ms 19.2MB 167ms 0ms wasmtime 31.0.0
wasm 3.rs 187ms 5.5ms 21.1MB 167ms 0ms wasmtime 31.0.0
chapel 3.chpl 188ms 1.6ms 32.2MB 180ms 0ms chpl 1.31.0
chapel 4.chpl 196ms 21ms 32.3MB 190ms 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 1202ms 100ms 19.4MB 1187ms 0ms wasmtime 31.0.0
chapel 1-m.chpl 2266ms 93ms 525.8MB 4393ms 80ms chpl 1.31.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 87ms 4.6ms 18.0MB 73ms 0ms wasmtime 31.0.0
chapel 1-m.chpl 198ms 4.8ms 494.6MB 317ms 50ms chpl 1.31.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 73ms 2.7ms 32.5MB 70ms 0ms chpl 1.31.0
wasm 1.rs 425ms 3.8ms 18.6MB 410ms 0ms wasmtime 31.0.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 34ms 1.3ms 30.5MB 30ms 0ms chpl 1.31.0
wasm 1.rs 113ms 2.1ms 18.1MB 100ms 0ms wasmtime 31.0.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 106ms 1.8ms 28.3MB 190ms 0ms chpl 1.31.0
wasm 1.rs 238ms 2.4ms 17.2MB 223ms 3ms wasmtime 31.0.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 21ms 1.3ms 28.4MB 20ms 0ms chpl 1.31.0
wasm 1.rs 32ms 0.6ms 17.2MB 20ms 0ms wasmtime 31.0.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 7.0ms 0.7ms 17.4MB 0ms 0ms wasmtime 31.0.0
chapel 1.chpl 11ms 0.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 1.1ms 87.0MB 1410ms 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 0.5ms 87.0MB 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 326ms 5.3ms 28.9MB 317ms 0ms chpl 1.31.0
wasm 1.rs 411ms 4.6ms 17.1MB 400ms 0ms wasmtime 31.0.0
wasm 2.rs 583ms 2.7ms 17.0MB 570ms 0ms wasmtime 31.0.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 45ms 2.3ms 28.8MB 40ms 0ms chpl 1.31.0
wasm 1.rs 49ms 0.3ms 17.2MB 37ms 0ms wasmtime 31.0.0
wasm 2.rs 66ms 0.5ms 17.0MB 53ms 0ms wasmtime 31.0.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 446ms 2.3ms 28.4MB 440ms 0ms chpl 1.31.0
wasm 2.rs 2227ms 21ms 18.3MB 2210ms 0ms wasmtime 31.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 116ms 1.2ms 30.3MB 110ms 0ms chpl 1.31.0
wasm 2.rs 520ms 1.0ms 17.3MB 507ms 0ms wasmtime 31.0.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1399ms 7.7ms 222.1MB 1347ms 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 164ms 2.9ms 49.0MB 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 1181ms 3.6ms 29.2MB 1177ms 0ms chpl 1.31.0
wasm 1.rs 3547ms 5.6ms 16.9MB 3533ms 0ms wasmtime 31.0.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 308ms 2.9ms 29.0MB 303ms 0ms chpl 1.31.0
wasm 1.rs 896ms 1.8ms 17.3MB 880ms 0ms wasmtime 31.0.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1928ms 19ms 28.8MB 3830ms 0ms chpl 1.31.0
wasm 2.rs 3604ms 8.1ms 16.9MB 3590ms 0ms wasmtime 31.0.0
chapel 1.chpl 3725ms 17ms 28.8MB 3720ms 0ms chpl 1.31.0
wasm 7.rs 4908ms 6.3ms 17.4MB 4897ms 0ms wasmtime 31.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 492ms 0.6ms 28.5MB 957ms 0ms chpl 1.31.0
wasm 2.rs 907ms 1.1ms 16.7MB 893ms 0ms wasmtime 31.0.0
chapel 1.chpl 940ms 1.1ms 28.8MB 933ms 0ms chpl 1.31.0
wasm 7.rs 1232ms 0.2ms 16.9MB 1220ms 0ms wasmtime 31.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 240ms 0ms chpl 1.31.0
wasm 2.rs 235ms 0.3ms 17.0MB 220ms 0ms wasmtime 31.0.0
chapel 1.chpl 247ms 2.4ms 28.8MB 240ms 0ms chpl 1.31.0
wasm 7.rs 316ms 1.5ms 16.7MB 300ms 0ms wasmtime 31.0.0