Codon VS Wasm benchmarks

Current benchmark data was generated on Wed Jan 22 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.)

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 4.1ms 0.5ms 5.5MB 0ms 0ms codon 0.17.0
wasm 1.rs 7.3ms 0.2ms 20.6MB 0ms 0ms wasmtime 29.0.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 407ms 1.8ms 19.2MB 390ms 0ms wasmtime 29.0.1
wasm 2.rs 579ms 1.4ms 19.2MB 563ms 0ms wasmtime 29.0.1
codon 1.py 1371ms 99ms 7.9MB 1357ms 0ms codon 0.17.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
wasm 1.rs 49ms 0.4ms 21.2MB 37ms 0ms wasmtime 29.0.1
wasm 2.rs 66ms 1.1ms 19.2MB 57ms 0ms wasmtime 29.0.1
codon 1.py 135ms 1.9ms 7.9MB 123ms 0ms codon 0.17.0

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 368ms 5.0ms 46.5MB 357ms 0ms codon 0.17.0
wasm 2.rs 370ms 9.0ms 24.2MB 357ms 0ms wasmtime 29.0.1
wasm 1.rs 471ms 3.2ms 58.5MB 453ms 3ms wasmtime 29.0.1
codon 2.py 848ms 3.7ms 100.0MB 830ms 13ms codon 0.17.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 71ms 1.3ms 15.3MB 60ms 0ms codon 0.17.0
wasm 2.rs 93ms 1.0ms 22.5MB 80ms 3ms wasmtime 29.0.1
wasm 1.rs 97ms 3.2ms 29.2MB 87ms 0ms wasmtime 29.0.1
codon 2.py 198ms 1.5ms 25.9MB 187ms 3ms codon 0.17.0