Codon VS C# benchmarks

Current benchmark data was generated on Tue Mar 25 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
csharp 1.cs 8.7ms 2.7ms 9.4MB 0ms 0ms dotnet/aot 9.0.202
codon 1-m.py 11ms 0.7ms 8.6MB 20ms 0ms codon 0.18.2
csharp 1.cs 32ms 0.6ms 21.6MB 20ms 0ms mono 6.12.0
csharp 1.cs 36ms 1.2ms 26.1MB 20ms 6ms dotnet 9.0.202

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 9.cs 364ms 3.9ms 27.8MB 340ms 7ms dotnet 9.0.202
csharp 8.cs 372ms 2.5ms 9.9MB 357ms 0ms dotnet/aot 9.0.202
csharp 8.cs 422ms 2.6ms 27.5MB 400ms 10ms dotnet 9.0.202
csharp 8.cs 1256ms 5.3ms 22.3MB 1240ms 3ms mono 6.12.0
codon 1.py 1322ms 1.2ms 8.8MB 1630ms 0ms codon 0.18.2

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 8.cs 47ms 0.7ms 9.8MB 30ms 0ms dotnet/aot 9.0.202
csharp 8.cs 96ms 1.3ms 27.5MB 80ms 10ms dotnet 9.0.202
csharp 9.cs 97ms 4.6ms 27.8MB 73ms 10ms dotnet 9.0.202
csharp 8.cs 165ms 1.2ms 20.8MB 150ms 0ms mono 6.12.0
codon 1-m.py 176ms 3.4ms 9.0MB 487ms 0ms codon 0.18.2

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 350ms 3.6ms 78.7MB 327ms 10ms dotnet/aot 9.0.202
csharp 1.cs 399ms 20ms 96.2MB 373ms 17ms dotnet 9.0.202
csharp 2.cs 401ms 3.8ms 35.7MB 380ms 10ms dotnet 9.0.202
csharp 2.cs 425ms 3.0ms 17.4MB 413ms 0ms dotnet/aot 9.0.202
codon 1-m.py 461ms 8.3ms 47.7MB 763ms 0ms codon 0.18.2
csharp 1.cs 564ms 2.7ms 83.9MB 543ms 10ms mono 6.12.0
codon 2.py 1572ms 19ms 100.8MB 1877ms 27ms codon 0.18.2
csharp 2.cs 1867ms 2.9ms 29.4MB 1850ms 0ms mono 6.12.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 69ms 1.7ms 24.8MB 50ms 0ms dotnet/aot 9.0.202
csharp 1.cs 107ms 5.9ms 42.4MB 87ms 10ms dotnet 9.0.202
csharp 2.cs 112ms 3.0ms 11.8MB 97ms 0ms dotnet/aot 9.0.202
codon 1-m.py 125ms 0.2ms 18.6MB 430ms 0ms codon 0.18.2
csharp 2.cs 131ms 2.0ms 29.9MB 110ms 13ms dotnet 9.0.202
csharp 1.cs 143ms 0.4ms 38.5MB 130ms 0ms mono 6.12.0
codon 2-m.py 397ms 1.3ms 27.1MB 707ms 3ms codon 0.18.2
csharp 2.cs 486ms 4.3ms 23.1MB 470ms 0ms mono 6.12.0