Codon VS Go 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
go 1.go 1.6ms 0.4ms 0.0MB 0ms 0ms tinygo 0.28.1
go 1.go 3.0ms 0.2ms 2.9MB 0ms 0ms go 1.20.6
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
go 1.go 430ms 0.7ms 0.0MB 420ms 0ms tinygo 0.28.1
go 1.go 456ms 1.6ms 2.9MB 450ms 0ms go 1.20.6
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
go 1.go 45ms 0.7ms 0.0MB 37ms 0ms tinygo 0.28.1
go 1.go 52ms 0.6ms 2.9MB 40ms 0ms go 1.20.6
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
go 1.go 600ms 68ms 43.8MB 580ms 7ms tinygo 0.28.1
go 1.go 633ms 64ms 72.4MB 607ms 7ms go 1.20.6
go 2.go 640ms 9.9ms 16.3MB 627ms 0ms tinygo 0.28.1
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
go 2.go 915ms 12ms 21.8MB 887ms 10ms go 1.20.6

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 136ms 2.3ms 21.5MB 117ms 0ms go 1.20.6
go 1.go 138ms 4.4ms 13.4MB 127ms 0ms tinygo 0.28.1
codon 1.py 150ms 1.1ms 15.1MB 140ms 0ms codon 0.16.2
go 2.go 153ms 3.0ms 5.6MB 143ms 0ms tinygo 0.28.1
codon 2.py 202ms 0.9ms 25.6MB 183ms 7ms codon 0.16.2
go 2.go 217ms 1.8ms 7.3MB 207ms 0ms go 1.20.6