Codon VS Wasm benchmarks

Current benchmark data was generated on Sun Jan 29 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
codon 1.py 4.1ms 0.8ms 5.3MB 0ms 0ms codon 0.15.4
wasm 1.rs 5.7ms 0.4ms 15.5MB 0ms 0ms wasmedgec 0.11.2
wasm 1.rs 5.8ms 1.1ms 9.1MB 0ms 0ms wasmtime 5.0.0
wasm 1.rs 79ms 1.9ms 43.5MB 96ms 2ms node 16.19.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 488ms 0.6ms 10.9MB 477ms 0ms wasmtime 5.0.0
wasm 1.rs 500ms 1.0ms 16.0MB 483ms 0ms wasmedgec 0.11.2
wasm 1.rs 565ms 1.9ms 48.0MB 587ms 3ms node 16.19.0
wasm 2.rs 665ms 0.1ms 9.4MB 653ms 0ms wasmtime 5.0.0
wasm 2.rs 691ms 0.6ms 15.0MB 677ms 3ms wasmedgec 0.11.2
wasm 2.rs 743ms 1.7ms 48.8MB 760ms 10ms node 16.19.0
codon 1.py 1947ms 23ms 5.3MB 1933ms 0ms codon 0.15.4

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 56ms 0.7ms 11.4MB 43ms 0ms wasmtime 5.0.0
wasm 1.rs 58ms 1.7ms 15.4MB 43ms 0ms wasmedgec 0.11.2
wasm 2.rs 74ms 0.8ms 11.2MB 60ms 0ms wasmtime 5.0.0
wasm 2.rs 76ms 0.5ms 15.3MB 60ms 0ms wasmedgec 0.11.2
wasm 1.rs 144ms 2.2ms 47.7MB 167ms 0ms node 16.19.0
wasm 2.rs 166ms 2.9ms 48.8MB 180ms 10ms node 16.19.0
codon 1.py 197ms 0.8ms 5.3MB 187ms 0ms codon 0.15.4

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 2.rs 554ms 0.4ms 21.4MB 537ms 3ms wasmedgec 0.11.2
wasm 1.rs 665ms 11ms 53.7MB 647ms 7ms wasmedgec 0.11.2
wasm 2.rs 720ms 5.8ms 48.9MB 727ms 7ms node 16.19.0
wasm 2.rs 729ms 7.3ms 15.9MB 710ms 0ms wasmtime 5.0.0
wasm 1.rs 765ms 32ms 82.8MB 767ms 10ms node 16.19.0
codon 1.py 873ms 79ms 48.3MB 850ms 3ms codon 0.15.4
codon 2.py 1003ms 24ms 106.7MB 977ms 13ms codon 0.15.4
wasm 1.rs 1020ms 12ms 50.0MB 1003ms 7ms wasmtime 5.0.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 2.rs 136ms 2.1ms 16.7MB 123ms 0ms wasmedgec 0.11.2
wasm 1.rs 142ms 0.4ms 25.4MB 130ms 0ms wasmedgec 0.11.2
codon 1.py 150ms 0.2ms 15.1MB 133ms 3ms codon 0.15.4
wasm 2.rs 176ms 0.6ms 12.1MB 167ms 0ms wasmtime 5.0.0
codon 2.py 185ms 3.8ms 23.9MB 173ms 3ms codon 0.15.4
wasm 2.rs 229ms 4.4ms 44.5MB 237ms 3ms node 16.19.0
wasm 1.rs 231ms 0.8ms 20.6MB 220ms 0ms wasmtime 5.0.0
wasm 1.rs 232ms 4.0ms 53.3MB 237ms 3ms node 16.19.0