Codon VS Rust 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
rust 1.rs 2.1ms 0.4ms 1.9MB 0ms 0ms rustc 1.73.0-nightly
rust 1.rs 2.1ms 0.4ms 2.0MB 0ms 0ms rustc 1.70.0
codon 1.py 4.0ms 0.6ms 5.1MB 0ms 0ms codon 0.16.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 4-i.rs 255ms 0.2ms 1.0MB 247ms 0ms rustc 1.70.0
rust 3.rs 321ms 0.4ms 1.0MB 310ms 0ms rustc 1.73.0-nightly
rust 7-i.rs 322ms 0.4ms 1.1MB 310ms 0ms rustc 1.70.0
rust 2.rs 332ms 2.6ms 1.0MB 323ms 0ms rustc 1.70.0
rust 1.rs 390ms 4.6ms 1.1MB 377ms 0ms rustc 1.70.0
codon 1.py 1947ms 41ms 7.2MB 1933ms 0ms codon 0.16.2

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 4-i.rs 28ms 0.2ms 1.1MB 20ms 0ms rustc 1.70.0
rust 7-i.rs 34ms 0.2ms 1.1MB 27ms 0ms rustc 1.70.0
rust 3.rs 35ms 1.1ms 1.0MB 23ms 0ms rustc 1.73.0-nightly
rust 2.rs 35ms 0.3ms 1.0MB 30ms 0ms rustc 1.70.0
rust 1.rs 41ms 0.6ms 1.1MB 30ms 0ms rustc 1.70.0
codon 1.py 198ms 2.4ms 7.3MB 190ms 0ms codon 0.16.2

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2.rs 459ms 1.6ms 6.6MB 443ms 0ms rustc 1.70.0
rust 1.rs 519ms 15ms 40.9MB 497ms 7ms rustc 1.70.0
codon 1.py 682ms 64ms 44.5MB 657ms 10ms codon 0.16.2
codon 2.py 911ms 35ms 104.9MB 883ms 13ms codon 0.16.2

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2.rs 102ms 1.2ms 3.1MB 90ms 0ms rustc 1.70.0
rust 1.rs 124ms 4.5ms 11.6MB 110ms 0ms rustc 1.70.0
codon 1.py 150ms 1.1ms 15.1MB 140ms 0ms codon 0.16.2
codon 2.py 202ms 0.9ms 25.6MB 183ms 7ms codon 0.16.2