Julia VS Wasm benchmarks

Current benchmark data was generated on Thu Jul 13 2023, 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.)

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 7.0ms 1.0ms 16.1MB 0ms 0ms wasmtime 10.0.1
wasm 1.rs 9.9ms 0.9ms 28.8MB 0ms 0ms wasmedgec 0.13.1
wasm 1.rs 47ms 2.4ms 47.3MB 32ms 2ms node 18.16.1
julia 1.jl 200ms 0.6ms 216.9MB 112ms 76ms julia/aot 1.9.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 472ms 2.5ms 16.1MB 463ms 0ms wasmtime 10.0.1
wasm 1.rs 492ms 0.4ms 28.6MB 477ms 0ms wasmedgec 0.13.1
julia 7.jl 600ms 25ms 223.1MB 523ms 63ms julia/aot 1.9.2
wasm 2.rs 655ms 4.7ms 27.8MB 633ms 7ms wasmedgec 0.13.1
wasm 2.rs 657ms 1.4ms 16.3MB 643ms 0ms wasmtime 10.0.1
wasm 1.rs 774ms 77ms 48.6MB 760ms 7ms node 18.16.1
wasm 2.rs 943ms 2.4ms 49.3MB 930ms 7ms node 18.16.1

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 55ms 1.7ms 16.1MB 43ms 0ms wasmtime 10.0.1
wasm 1.rs 60ms 2.1ms 27.3MB 50ms 0ms wasmedgec 0.13.1
wasm 2.rs 75ms 1.6ms 16.0MB 63ms 0ms wasmtime 10.0.1
wasm 2.rs 77ms 1.6ms 28.6MB 63ms 3ms wasmedgec 0.13.1
wasm 1.rs 119ms 0.8ms 49.5MB 107ms 0ms node 18.16.1
wasm 2.rs 142ms 2.9ms 49.9MB 127ms 3ms node 18.16.1
julia 7.jl 281ms 4.9ms 223.1MB 193ms 73ms julia/aot 1.9.2

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 441ms 3.7ms 206.9MB 367ms 60ms julia/aot 1.9.2
wasm 2.rs 586ms 9.0ms 31.6MB 567ms 3ms wasmedgec 0.13.1
wasm 2.rs 604ms 0.9ms 21.2MB 590ms 0ms wasmtime 10.0.1
wasm 1.rs 613ms 36ms 66.5MB 587ms 10ms wasmedgec 0.13.1
wasm 1.rs 624ms 13ms 55.3MB 603ms 7ms wasmtime 10.0.1
wasm 2.rs 1090ms 9.2ms 53.6MB 1067ms 10ms node 18.16.1
wasm 1.rs 1351ms 92ms 87.9MB 1337ms 10ms node 18.16.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 2.rs 142ms 0.1ms 17.4MB 127ms 0ms wasmtime 10.0.1
wasm 2.rs 142ms 2.1ms 29.2MB 127ms 3ms wasmedgec 0.13.1
wasm 1.rs 145ms 0.5ms 25.9MB 130ms 0ms wasmtime 10.0.1
wasm 1.rs 149ms 3.2ms 40.5MB 130ms 3ms wasmedgec 0.13.1
julia 1.jl 236ms 5.2ms 200.7MB 150ms 70ms julia/aot 1.9.2
wasm 2.rs 298ms 1.7ms 49.2MB 280ms 10ms node 18.16.1
wasm 1.rs 349ms 2.5ms 58.9MB 333ms 7ms node 18.16.1