Codon VS Javascript 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
javascript 1.js 13ms 0.5ms 32.3MB 0ms 10ms bun 1.1.45
javascript 1.js 31ms 0.6ms 52.0MB 14ms 8ms node 23.6.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 6.js 459ms 2.4ms 59.7MB 447ms 7ms node 23.6.0
javascript 6.js 658ms 0.3ms 45.6MB 653ms 7ms bun 1.1.45
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
javascript 6.js 77ms 1.0ms 59.8MB 60ms 10ms node 23.6.0
javascript 6.js 85ms 2.1ms 45.4MB 83ms 3ms bun 1.1.45
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
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
codon 2.py 198ms 1.5ms 25.9MB 187ms 3ms codon 0.17.0