Chapel VS Wasm benchmarks

Current benchmark data was generated on Thu Sep 22 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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 3.rs 1991ms 14ms 51.1MB 1967ms 7ms wasmedgec 0.11.0
wasm 3.rs 2042ms 6.2ms 37.8MB 2010ms 17ms wasmer/llvm 2.3.0
wasm 5.rs 2143ms 150ms 35.0MB 2123ms 0ms wasmedgec 0.11.0
wasm 4.rs 2223ms 3.6ms 34.4MB 2203ms 7ms wasmedgec 0.11.0
chapel 4.chpl 2299ms 1.2ms 58.2MB 2277ms 13ms chpl 1.27.0
wasm 4.rs 2416ms 8.0ms 21.7MB 2390ms 7ms wasmer/llvm 2.3.0
chapel 3.chpl 2433ms 5.5ms 50.3MB 2413ms 13ms chpl 1.27.0
wasm 3.rs 2477ms 19ms 42.5MB 2457ms 0ms wasmtime 1.0.0
wasm 5.rs 2565ms 1.4ms 21.9MB 2547ms 10ms wasmer/llvm 2.3.0
wasm 5.rs 2651ms 56ms 59.5MB 2637ms 17ms node 16.17.0
wasm 4.rs 2771ms 42ms 58.6MB 2777ms 13ms node 16.17.0
wasm 3.rs 2796ms 31ms 78.0MB 2793ms 20ms node 16.17.0
wasm 5.rs 2916ms 20ms 26.6MB 2893ms 7ms wasmtime 1.0.0
wasm 4.rs 3153ms 28ms 26.5MB 3130ms 7ms wasmtime 1.0.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 192ms 0.5ms 9.8MB 173ms 0ms wasmer/llvm 2.3.0
wasm 3.rs 194ms 7.6ms 23.0MB 180ms 0ms wasmedgec 0.11.0
wasm 5.rs 211ms 19ms 21.0MB 197ms 0ms wasmedgec 0.11.0
chapel 3.chpl 222ms 0.5ms 13.1MB 210ms 3ms chpl 1.27.0
wasm 4.rs 222ms 11ms 20.8MB 210ms 0ms wasmedgec 0.11.0
chapel 4.chpl 222ms 7.3ms 26.1MB 210ms 0ms chpl 1.27.0
wasm 4.rs 227ms 0.3ms 8.0MB 217ms 0ms wasmer/llvm 2.3.0
wasm 3.rs 234ms 1.5ms 14.5MB 220ms 0ms wasmtime 1.0.0
wasm 5.rs 244ms 0.1ms 7.9MB 230ms 0ms wasmer/llvm 2.3.0
wasm 5.rs 280ms 8.4ms 12.6MB 263ms 0ms wasmtime 1.0.0
wasm 4.rs 301ms 4.3ms 12.6MB 283ms 3ms wasmtime 1.0.0
wasm 3.rs 332ms 5.2ms 46.4MB 340ms 3ms node 16.17.0
wasm 4.rs 339ms 8.9ms 44.0MB 353ms 7ms node 16.17.0
wasm 5.rs 369ms 16ms 45.6MB 347ms 10ms node 16.17.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 1268ms 0.5ms 8.0MB 1257ms 0ms wasmer/llvm 2.3.0
wasm 3.rs 1530ms 20ms 48.2MB 1570ms 20ms node 16.17.0
wasm 3.rs 1588ms 41ms 12.6MB 1573ms 0ms wasmtime 1.0.0
wasm 3.rs 1938ms 4.0ms 22.6MB 1920ms 3ms wasmedgec 0.11.0
chapel 1-m.chpl 4004ms 54ms 169.4MB 7737ms 47ms chpl 1.27.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 3.rs 84ms 0.8ms 7.0MB 70ms 0ms wasmer/llvm 2.3.0
wasm 3.rs 105ms 3.6ms 11.2MB 93ms 0ms wasmtime 1.0.0
wasm 3.rs 134ms 0.6ms 19.8MB 123ms 0ms wasmedgec 0.11.0
wasm 3.rs 216ms 4.3ms 48.2MB 267ms 7ms node 16.17.0
chapel 1-m.chpl 263ms 2.4ms 30.2MB 480ms 3ms chpl 1.27.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 97ms 0.5ms 36.1MB 90ms 0ms chpl 1.27.0
wasm 1.rs 465ms 0.4ms 7.4MB 453ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 479ms 1.1ms 20.2MB 463ms 3ms wasmedgec 0.11.0
wasm 1.rs 636ms 30ms 12.1MB 627ms 0ms wasmtime 1.0.0
wasm 1.rs 708ms 1.5ms 49.7MB 747ms 13ms node 16.17.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 46ms 1.3ms 34.1MB 37ms 3ms chpl 1.27.0
wasm 1.rs 121ms 0.4ms 6.5MB 110ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 131ms 0.8ms 21.6MB 120ms 0ms wasmedgec 0.11.0
wasm 1.rs 167ms 8.2ms 11.6MB 160ms 0ms wasmtime 1.0.0
wasm 1.rs 272ms 3.4ms 48.8MB 317ms 7ms node 16.17.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 147ms 2.2ms 32.0MB 250ms 3ms chpl 1.27.0
wasm 1.rs 347ms 0.2ms 6.1MB 333ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 350ms 2.0ms 9.5MB 337ms 0ms wasmtime 1.0.0
wasm 1.rs 359ms 0.2ms 18.9MB 340ms 0ms wasmedgec 0.11.0
wasm 1.rs 465ms 1.2ms 43.7MB 480ms 3ms node 16.17.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 34ms 1.5ms 32.0MB 30ms 7ms chpl 1.27.0
wasm 1.rs 38ms 0.2ms 6.1MB 30ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 42ms 0.6ms 9.2MB 30ms 0ms wasmtime 1.0.0
wasm 1.rs 44ms 0.5ms 18.5MB 37ms 0ms wasmedgec 0.11.0
wasm 1.rs 126ms 2.2ms 47.5MB 143ms 3ms node 16.17.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 2.7ms 0.5ms 4.9MB 0ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 6.0ms 0.9ms 9.2MB 0ms 0ms wasmtime 1.0.0
wasm 1.rs 8.5ms 2.6ms 18.4MB 0ms 0ms wasmedgec 0.11.0
chapel 1.chpl 18ms 3.7ms 32.4MB 10ms 0ms chpl 1.27.0
wasm 1.rs 83ms 1.1ms 43.5MB 94ms 6ms node 16.17.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 936ms 1.2ms 100.4MB 1733ms 13ms chpl 1.27.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 157ms 2.7ms 90.4MB 257ms 10ms chpl 1.27.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 363ms 2.4ms 32.4MB 350ms 7ms chpl 1.27.0
wasm 1.rs 469ms 1.1ms 4.9MB 457ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 497ms 0.9ms 9.6MB 487ms 0ms wasmtime 1.0.0
wasm 1.rs 501ms 1.0ms 18.5MB 483ms 0ms wasmedgec 0.11.0
wasm 1.rs 571ms 3.9ms 48.3MB 593ms 7ms node 16.17.0
wasm 2.rs 678ms 0.6ms 18.9MB 667ms 0ms wasmedgec 0.11.0
wasm 2.rs 679ms 1.0ms 9.7MB 663ms 0ms wasmtime 1.0.0
wasm 2.rs 688ms 0.2ms 4.9MB 677ms 0ms wasmer/llvm 2.3.0
wasm 2.rs 758ms 12ms 48.3MB 783ms 10ms node 16.17.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 51ms 0.6ms 4.8MB 40ms 0ms wasmer/llvm 2.3.0
chapel 2.chpl 56ms 1.3ms 32.4MB 50ms 0ms chpl 1.27.0
wasm 1.rs 57ms 0.8ms 11.5MB 47ms 0ms wasmtime 1.0.0
wasm 1.rs 59ms 0.3ms 18.9MB 47ms 0ms wasmedgec 0.11.0
wasm 2.rs 72ms 0.5ms 4.8MB 60ms 0ms wasmer/llvm 2.3.0
wasm 2.rs 75ms 0.2ms 11.4MB 60ms 0ms wasmtime 1.0.0
wasm 2.rs 78ms 3.4ms 18.7MB 63ms 0ms wasmedgec 0.11.0
wasm 1.rs 150ms 5.2ms 48.3MB 177ms 7ms node 16.17.0
wasm 2.rs 171ms 3.2ms 47.7MB 193ms 7ms node 16.17.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 593ms 1.5ms 34.1MB 580ms 7ms chpl 1.27.0
wasm 2.rs 3010ms 8.2ms 7.0MB 2990ms 0ms wasmer/llvm 2.3.0
wasm 2.rs 3124ms 6.9ms 18.9MB 3107ms 0ms wasmedgec 0.11.0
wasm 2.rs 3380ms 1.0ms 11.3MB 3370ms 0ms wasmtime 1.0.0
wasm 2.rs 3675ms 39ms 48.1MB 3717ms 10ms node 16.17.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 154ms 1.9ms 34.1MB 143ms 3ms chpl 1.27.0
wasm 2.rs 709ms 3.6ms 6.3MB 697ms 0ms wasmer/llvm 2.3.0
wasm 2.rs 745ms 5.2ms 19.6MB 727ms 0ms wasmedgec 0.11.0
wasm 2.rs 802ms 0.3ms 10.9MB 790ms 0ms wasmtime 1.0.0
wasm 2.rs 961ms 7.8ms 48.7MB 1007ms 10ms node 16.17.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 2015ms 13ms 251.7MB 1870ms 133ms chpl 1.27.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 222ms 1.0ms 56.8MB 203ms 10ms chpl 1.27.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 0.rs 417ms 0.1ms 18.8MB 410ms 0ms wasmedgec 0.11.0
wasm 0.rs 418ms 1.5ms 4.9MB 410ms 0ms wasmer/llvm 2.3.0
wasm 0.rs 471ms 0.3ms 11.7MB 460ms 0ms wasmtime 1.0.0
wasm 0.rs 505ms 2.3ms 46.9MB 537ms 0ms node 16.17.0
chapel 1.chpl 1536ms 10.0ms 32.3MB 1527ms 0ms chpl 1.27.0
wasm 1.rs 4460ms 4.0ms 4.9MB 4447ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 4635ms 155ms 20.2MB 4620ms 0ms wasmedgec 0.11.0
wasm 1.rs 4850ms 27ms 51.9MB 4890ms 17ms node 16.17.0
wasm 1.rs timeout 0.0ms 0.0MB 0ms 0ms wasmtime 1.0.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 0.rs 107ms 0.3ms 4.8MB 97ms 0ms wasmer/llvm 2.3.0
wasm 0.rs 112ms 0.6ms 18.3MB 100ms 0ms wasmedgec 0.11.0
wasm 0.rs 124ms 0.6ms 11.0MB 110ms 0ms wasmtime 1.0.0
wasm 0.rs 206ms 2.4ms 46.7MB 230ms 7ms node 16.17.0
chapel 1.chpl 398ms 0.9ms 32.3MB 383ms 3ms chpl 1.27.0
wasm 1.rs 1128ms 12ms 5.0MB 1107ms 0ms wasmer/llvm 2.3.0
wasm 1.rs 1142ms 0.4ms 18.5MB 1130ms 0ms wasmedgec 0.11.0
wasm 1.rs 1297ms 8.4ms 11.9MB 1283ms 0ms wasmtime 1.0.0
wasm 1.rs 1328ms 2.9ms 52.3MB 1380ms 7ms node 16.17.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 2299ms 91ms 32.5MB 4450ms 7ms chpl 1.27.0
wasm 2.rs 4126ms 1.0ms 19.2MB 4113ms 0ms wasmedgec 0.11.0
wasm 7.rs 4194ms 1.2ms 6.0MB 4180ms 0ms wasmer/llvm 2.3.0
wasm 7.rs 4266ms 0.6ms 18.7MB 4257ms 0ms wasmedgec 0.11.0
wasm 2.rs 4298ms 5.4ms 48.2MB 4320ms 10ms node 16.17.0
chapel 1.chpl 4375ms 0.8ms 32.5MB 4363ms 3ms chpl 1.27.0
wasm 2.rs 4396ms 1.1ms 6.1MB 4380ms 0ms wasmer/llvm 2.3.0
wasm 7.rs 4506ms 11ms 52.0MB 4527ms 7ms node 16.17.0
wasm 2.rs 4534ms 12ms 11.0MB 4520ms 0ms wasmtime 1.0.0
wasm 7.rs 4610ms 2.4ms 10.9MB 4600ms 0ms wasmtime 1.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 581ms 0.2ms 32.5MB 1107ms 0ms chpl 1.27.0
wasm 2.rs 1039ms 0.6ms 19.2MB 1027ms 0ms wasmedgec 0.11.0
wasm 7.rs 1052ms 1.1ms 6.0MB 1040ms 0ms wasmer/llvm 2.3.0
wasm 7.rs 1074ms 1.0ms 18.6MB 1063ms 0ms wasmedgec 0.11.0
wasm 2.rs 1102ms 1.1ms 6.2MB 1090ms 0ms wasmer/llvm 2.3.0
chapel 1.chpl 1110ms 0.7ms 32.4MB 1100ms 3ms chpl 1.27.0
wasm 2.rs 1143ms 3.4ms 48.7MB 1177ms 3ms node 16.17.0
wasm 2.rs 1146ms 1.0ms 12.9MB 1133ms 0ms wasmtime 1.0.0
wasm 7.rs 1160ms 0.2ms 11.5MB 1147ms 0ms wasmtime 1.0.0
wasm 7.rs 1207ms 2.4ms 48.3MB 1230ms 10ms node 16.17.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 165ms 2.1ms 32.5MB 287ms 0ms chpl 1.27.0
wasm 7.rs 266ms 0.6ms 4.9MB 253ms 0ms wasmer/llvm 2.3.0
wasm 2.rs 267ms 0.4ms 18.5MB 253ms 0ms wasmedgec 0.11.0
wasm 7.rs 277ms 2.1ms 19.1MB 263ms 0ms wasmedgec 0.11.0
wasm 2.rs 279ms 0.3ms 4.9MB 263ms 0ms wasmer/llvm 2.3.0
wasm 2.rs 293ms 0.3ms 9.7MB 280ms 0ms wasmtime 1.0.0
wasm 7.rs 296ms 0.3ms 9.4MB 283ms 0ms wasmtime 1.0.0
chapel 1.chpl 306ms 19ms 32.4MB 283ms 10ms chpl 1.27.0
wasm 2.rs 366ms 5.1ms 48.3MB 397ms 0ms node 16.17.0
wasm 7.rs 379ms 1.5ms 48.6MB 397ms 13ms node 16.17.0