Chapel 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 901ms 14ms 197.1MB 893ms 147ms dotnet 9.0.300
csharp 1.cs 1061ms 140ms 164.4MB 963ms 127ms dotnet/aot 9.0.300
csharp 1.cs 1725ms 105ms 103.6MB 1900ms 227ms mono 6.12.0
chapel 4.chpl 1954ms 6.5ms 62.3MB 1947ms 0ms chpl 1.31.0
chapel 3.chpl 2047ms 28ms 60.3MB 2040ms 3ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 141ms 1.3ms 46.1MB 120ms 10ms mono 6.12.0
csharp 1.cs 175ms 44ms 31.8MB 100ms 33ms dotnet/aot 9.0.300
chapel 4.chpl 185ms 3.6ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 185ms 0.6ms 32.2MB 180ms 0ms chpl 1.31.0
csharp 1.cs 191ms 4.8ms 49.7MB 147ms 37ms dotnet 9.0.300

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 2161ms 100ms 50.8MB 7650ms 67ms dotnet/aot 9.0.300
chapel 1-m.chpl 2211ms 79ms 480.1MB 4320ms 70ms chpl 1.31.0
csharp 1-m.cs 2851ms 149ms 74.2MB 9103ms 90ms dotnet 9.0.300

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 157ms 18ms 18.6MB 467ms 10ms dotnet/aot 9.0.300
chapel 1-m.chpl 179ms 0.7ms 445.0MB 293ms 40ms chpl 1.31.0
csharp 1-m.cs 277ms 19ms 36.9MB 790ms 20ms dotnet 9.0.300

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 71ms 1.5ms 32.5MB 70ms 0ms chpl 1.31.0
csharp 1.cs 4081ms 3.3ms 18.6MB 4057ms 10ms dotnet/aot 9.0.300
csharp 1.cs 4963ms 16ms 37.8MB 4927ms 17ms dotnet 9.0.300

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 33ms 2.6ms 30.5MB 30ms 0ms chpl 1.31.0
csharp 1.cs 682ms 5.7ms 14.6MB 663ms 0ms dotnet/aot 9.0.300
csharp 1.cs 867ms 15ms 33.6MB 847ms 10ms dotnet 9.0.300

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 104ms 1.5ms 28.3MB 190ms 0ms chpl 1.31.0
csharp 5-m.cs 124ms 7.2ms 23.0MB 350ms 80ms dotnet/aot 9.0.300
csharp 5-m.cs 190ms 9.8ms 39.9MB 463ms 120ms dotnet 9.0.300
csharp 5-m.cs 234ms 8.5ms 37.7MB 657ms 93ms mono 6.12.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 21ms 0.7ms 28.4MB 20ms 0ms chpl 1.31.0
csharp 5-m.cs 25ms 0.5ms 16.0MB 30ms 10ms dotnet/aot 9.0.300
csharp 5-m.cs 63ms 2.5ms 37.0MB 83ms 17ms dotnet 9.0.300
csharp 5-m.cs 72ms 3.0ms 29.5MB 103ms 20ms mono 6.12.0

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
chapel 1.chpl 9.3ms 1.5ms 28.8MB 0ms 0ms chpl 1.31.0
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

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 481ms 13ms 47.1MB 1307ms 20ms dotnet/aot 9.0.300
csharp 6-m.cs 714ms 22ms 68.3MB 1957ms 27ms dotnet 9.0.300
chapel 3-m.chpl 747ms 5.4ms 87.2MB 1417ms 10ms chpl 1.31.0
csharp 6-m.cs 1010ms 11ms 67.2MB 2927ms 23ms mono 6.12.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 97ms 6.0ms 35.6MB 167ms 13ms dotnet/aot 9.0.300
chapel 3-m.chpl 113ms 1.0ms 87.0MB 200ms 0ms chpl 1.31.0
csharp 6-m.cs 179ms 8.7ms 56.7MB 260ms 27ms dotnet 9.0.300
csharp 6-m.cs 193ms 3.0ms 60.0MB 377ms 20ms mono 6.12.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 322ms 1.7ms 28.8MB 320ms 0ms chpl 1.31.0
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

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 44ms 1.3ms 28.9MB 40ms 0ms chpl 1.31.0
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

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 444ms 0.7ms 30.4MB 440ms 0ms chpl 1.31.0
csharp 1.cs 3220ms 6.8ms 14.1MB 3130ms 87ms dotnet/aot 9.0.300
csharp 1.cs 3568ms 50ms 38.1MB 3597ms 107ms dotnet 9.0.300

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 113ms 1.8ms 30.4MB 110ms 0ms chpl 1.31.0
csharp 1.cs 759ms 6.1ms 13.5MB 727ms 20ms dotnet/aot 9.0.300
csharp 1.cs 985ms 4.4ms 37.8MB 1073ms 37ms dotnet 9.0.300

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1387ms 3.3ms 220.1MB 1343ms 40ms chpl 1.31.0
csharp 6.cs 1779ms 43ms 420.0MB 1673ms 157ms dotnet/aot 9.0.300
csharp 5.cs 2073ms 25ms 445.2MB 2110ms 180ms dotnet 9.0.300
csharp 6.cs 2734ms 47ms 438.7MB 2690ms 170ms dotnet 9.0.300
csharp 5.cs 4278ms 20ms 419.7MB 4187ms 143ms dotnet/aot 9.0.300

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 163ms 3.8ms 49.0MB 143ms 13ms chpl 1.31.0
csharp 6.cs 192ms 1.7ms 47.3MB 163ms 17ms dotnet/aot 9.0.300
csharp 5.cs 287ms 4.2ms 71.5MB 253ms 33ms dotnet 9.0.300
csharp 6.cs 394ms 4.6ms 69.6MB 360ms 27ms dotnet 9.0.300
csharp 5.cs 439ms 3.9ms 48.4MB 413ms 20ms dotnet/aot 9.0.300

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1181ms 6.5ms 29.1MB 1177ms 0ms chpl 1.31.0
csharp 1.cs 2830ms 23ms 13.1MB 2797ms 20ms dotnet/aot 9.0.300
csharp 1.cs 2943ms 2.6ms 35.1MB 3013ms 37ms dotnet 9.0.300

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 307ms 4.2ms 29.1MB 303ms 0ms chpl 1.31.0
csharp 1.cs 719ms 1.5ms 12.9MB 697ms 10ms dotnet/aot 9.0.300
csharp 1.cs 997ms 9.0ms 35.1MB 1083ms 23ms dotnet 9.0.300

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 1881ms 41ms 10.4MB 7243ms 7ms dotnet/aot 9.0.300
chapel 1-m.chpl 1922ms 11ms 29.0MB 3817ms 0ms chpl 1.31.0
csharp 3-m.cs 1938ms 34ms 29.9MB 7323ms 20ms dotnet 9.0.300
chapel 1.chpl 3716ms 4.8ms 28.8MB 3710ms 0ms chpl 1.31.0
csharp 3-m.cs 4838ms 168ms 25.5MB 18427ms 13ms mono 6.12.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 475ms 1.3ms 10.5MB 1813ms 0ms dotnet/aot 9.0.300
chapel 1-m.chpl 492ms 1.0ms 28.9MB 957ms 0ms chpl 1.31.0
csharp 3-m.cs 529ms 1.2ms 30.0MB 1873ms 10ms dotnet 9.0.300
chapel 1.chpl 940ms 1.7ms 28.8MB 940ms 0ms chpl 1.31.0
csharp 3-m.cs 1200ms 10ms 26.7MB 4517ms 7ms mono 6.12.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 129ms 0.6ms 10.6MB 447ms 10ms dotnet/aot 9.0.300
chapel 1-m.chpl 133ms 1.1ms 28.9MB 240ms 0ms chpl 1.31.0
csharp 3-m.cs 179ms 3.3ms 28.4MB 497ms 17ms dotnet 9.0.300
chapel 1.chpl 246ms 3.6ms 28.8MB 240ms 0ms chpl 1.31.0
csharp 3-m.cs 341ms 6.9ms 25.5MB 1153ms 7ms mono 6.12.0