Codon VS C# benchmarks

Current benchmark data was generated on Sun Jun 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 7.8ms 2.1ms 9.5MB 0ms 0ms dotnet/aot 9.0.300
codon 1-m.py 11ms 0.4ms 8.8MB 20ms 0ms codon 0.18.2
csharp 1.cs 30ms 0.5ms 21.7MB 18ms 2ms mono 6.12.0
csharp 1.cs 34ms 1.1ms 26.1MB 20ms 2ms dotnet 9.0.300

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 9.cs 360ms 3.8ms 27.9MB 340ms 10ms dotnet 9.0.300
csharp 8.cs 370ms 3.3ms 9.9MB 360ms 0ms dotnet/aot 9.0.300
csharp 8.cs 419ms 1.1ms 27.6MB 400ms 3ms dotnet 9.0.300
csharp 8.cs 1252ms 4.8ms 22.3MB 1237ms 0ms mono 6.12.0
codon 1.py 1352ms 60ms 9.1MB 1657ms 0ms codon 0.18.2

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 8.cs 44ms 0.2ms 9.9MB 30ms 0ms dotnet/aot 9.0.300
csharp 9.cs 93ms 3.0ms 27.6MB 73ms 7ms dotnet 9.0.300
csharp 8.cs 95ms 2.3ms 27.6MB 77ms 3ms dotnet 9.0.300
csharp 8.cs 161ms 0.7ms 22.4MB 147ms 0ms mono 6.12.0
codon 1-m.py 175ms 4.2ms 8.8MB 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 297ms 3.2ms 78.8MB 273ms 7ms dotnet/aot 9.0.300
csharp 1.cs 345ms 12ms 96.5MB 317ms 17ms dotnet 9.0.300
csharp 2.cs 392ms 2.8ms 17.7MB 380ms 0ms dotnet/aot 9.0.300
csharp 2.cs 399ms 7.5ms 35.3MB 377ms 13ms dotnet 9.0.300
codon 1-m.py 444ms 8.1ms 67.3MB 743ms 7ms codon 0.18.2
csharp 1.cs 538ms 2.7ms 84.2MB 517ms 10ms mono 6.12.0
codon 2.py 1520ms 13ms 100.8MB 1830ms 17ms codon 0.18.2
csharp 2.cs 1888ms 39ms 27.4MB 1873ms 0ms mono 6.12.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 64ms 1.2ms 24.9MB 50ms 0ms dotnet/aot 9.0.300
csharp 2.cs 101ms 1.4ms 11.9MB 90ms 0ms dotnet/aot 9.0.300
csharp 1.cs 108ms 2.1ms 42.5MB 83ms 7ms dotnet 9.0.300
codon 1-m.py 128ms 1.7ms 18.5MB 437ms 0ms codon 0.18.2
csharp 2.cs 134ms 3.2ms 29.9MB 110ms 7ms dotnet 9.0.300
csharp 1.cs 144ms 1.5ms 38.1MB 127ms 3ms mono 6.12.0
codon 2-m.py 392ms 4.2ms 27.4MB 703ms 7ms codon 0.18.2
csharp 2.cs 488ms 5.9ms 21.1MB 473ms 0ms mono 6.12.0