Codon VS C# benchmarks

Current benchmark data was generated on Tue Jul 01 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 6.3ms 0.3ms 8.3MB 0ms 0ms dotnet/aot 9.0.301
codon 1-m.py 11ms 0.6ms 8.5MB 20ms 0ms codon 0.19.0
csharp 1.cs 32ms 1.0ms 21.2MB 20ms 0ms mono 6.12.0
csharp 1.cs 38ms 1.2ms 26.3MB 20ms 4ms dotnet 9.0.301

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 9.cs 365ms 5.3ms 27.6MB 343ms 10ms dotnet 9.0.301
csharp 8.cs 373ms 3.5ms 9.8MB 360ms 0ms dotnet/aot 9.0.301
csharp 8.cs 425ms 6.0ms 27.6MB 410ms 7ms dotnet 9.0.301
csharp 8.cs 1248ms 2.0ms 20.3MB 1230ms 0ms mono 6.12.0
codon 1.py 1325ms 2.3ms 9.4MB 1630ms 0ms codon 0.19.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 8.cs 46ms 1.5ms 9.9MB 30ms 0ms dotnet/aot 9.0.301
csharp 8.cs 97ms 3.2ms 27.5MB 77ms 7ms dotnet 9.0.301
csharp 9.cs 99ms 5.9ms 27.9MB 73ms 10ms dotnet 9.0.301
csharp 8.cs 168ms 3.1ms 22.4MB 153ms 0ms mono 6.12.0
codon 1-m.py 173ms 4.4ms 9.4MB 483ms 0ms codon 0.19.0

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 361ms 7.5ms 96.3MB 333ms 17ms dotnet 9.0.301
csharp 1.cs 379ms 11ms 78.8MB 360ms 7ms dotnet/aot 9.0.301
csharp 2.cs 399ms 4.3ms 35.7MB 377ms 10ms dotnet 9.0.301
codon 1-m.py 409ms 6.0ms 48.6MB 697ms 3ms codon 0.19.0
csharp 2.cs 423ms 2.5ms 17.5MB 410ms 0ms dotnet/aot 9.0.301
csharp 1.cs 584ms 14ms 83.9MB 560ms 10ms mono 6.12.0
codon 2.py 913ms 1.4ms 100.8MB 1220ms 23ms codon 0.19.0
csharp 2.cs 1886ms 26ms 29.8MB 1870ms 3ms mono 6.12.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 65ms 1.9ms 24.8MB 50ms 0ms dotnet/aot 9.0.301
csharp 1.cs 104ms 4.5ms 42.6MB 80ms 10ms dotnet 9.0.301
csharp 2.cs 110ms 2.4ms 12.1MB 100ms 0ms dotnet/aot 9.0.301
codon 1-m.py 117ms 2.3ms 19.4MB 427ms 0ms codon 0.19.0
csharp 2.cs 129ms 3.8ms 30.1MB 110ms 7ms dotnet 9.0.301
csharp 1.cs 148ms 0.4ms 36.3MB 130ms 7ms mono 6.12.0
codon 2-m.py 233ms 3.4ms 27.7MB 543ms 7ms codon 0.19.0
csharp 2.cs 487ms 4.8ms 21.1MB 473ms 0ms mono 6.12.0