Chapel VS C# benchmarks

Current benchmark data was generated on Fri Aug 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 940ms 5.4ms 167.7MB 933ms 127ms dotnet/aot 9.0.303
csharp 1.cs 952ms 25ms 200.7MB 960ms 150ms dotnet 9.0.303
csharp 1.cs 1675ms 21ms 101.3MB 1873ms 200ms mono 6.12.0
chapel 4.chpl 1943ms 3.5ms 62.3MB 1937ms 0ms chpl 1.31.0
chapel 3.chpl 2057ms 34ms 62.4MB 2050ms 0ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 115ms 10ms 38.9MB 80ms 27ms dotnet/aot 9.0.303
csharp 1.cs 143ms 2.1ms 42.1MB 120ms 13ms mono 6.12.0
chapel 4.chpl 185ms 1.5ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 2.4ms 32.3MB 187ms 0ms chpl 1.31.0
csharp 1.cs 198ms 7.5ms 50.1MB 157ms 30ms dotnet 9.0.303

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 2078ms 121ms 50.7MB 7197ms 77ms dotnet/aot 9.0.303
chapel 1-m.chpl 2227ms 82ms 611.9MB 4340ms 77ms chpl 1.31.0
csharp 1-m.cs 2932ms 111ms 73.9MB 9117ms 90ms dotnet 9.0.303

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 157ms 8.6ms 20.3MB 457ms 13ms dotnet/aot 9.0.303
chapel 1-m.chpl 195ms 2.0ms 578.1MB 313ms 50ms chpl 1.31.0
csharp 1-m.cs 284ms 10.0ms 37.1MB 813ms 20ms dotnet 9.0.303

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 69ms 0.2ms 32.5MB 70ms 0ms chpl 1.31.0
csharp 1.cs 4085ms 1.5ms 18.4MB 4060ms 10ms dotnet/aot 9.0.303
csharp 1.cs 4945ms 9.9ms 37.9MB 4913ms 20ms dotnet 9.0.303

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 33ms 0.3ms 30.5MB 30ms 0ms chpl 1.31.0
csharp 1.cs 679ms 1.9ms 14.6MB 660ms 7ms dotnet/aot 9.0.303
csharp 1.cs 862ms 3.7ms 33.8MB 837ms 13ms dotnet 9.0.303

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 106ms 1.0ms 28.4MB 190ms 0ms chpl 1.31.0
csharp 5-m.cs 125ms 3.7ms 24.1MB 363ms 77ms dotnet/aot 9.0.303
csharp 5-m.cs 196ms 8.4ms 37.5MB 470ms 123ms dotnet 9.0.303
csharp 5-m.cs 223ms 3.2ms 38.7MB 650ms 70ms mono 6.12.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 20ms 1.0ms 28.4MB 20ms 0ms chpl 1.31.0
csharp 5-m.cs 24ms 2.5ms 15.9MB 37ms 13ms dotnet/aot 9.0.303
csharp 5-m.cs 61ms 2.6ms 37.1MB 87ms 17ms dotnet 9.0.303
csharp 5-m.cs 71ms 2.2ms 30.7MB 107ms 17ms mono 6.12.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 6.8ms 2.0ms 9.5MB 0ms 0ms dotnet/aot 9.0.303
chapel 1.chpl 10ms 0.5ms 28.8MB 0ms 0ms chpl 1.31.0
csharp 1.cs 30ms 1.2ms 21.3MB 20ms 0ms mono 6.12.0
csharp 1.cs 35ms 0.9ms 26.1MB 20ms 4ms dotnet 9.0.303

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 453ms 13ms 45.8MB 1247ms 20ms dotnet/aot 9.0.303
csharp 6-m.cs 739ms 38ms 67.3MB 2053ms 33ms dotnet 9.0.303
chapel 3-m.chpl 746ms 4.8ms 99.0MB 1410ms 7ms chpl 1.31.0
csharp 6-m.cs 1004ms 20ms 66.7MB 2900ms 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 94ms 2.4ms 36.8MB 153ms 20ms dotnet/aot 9.0.303
chapel 3-m.chpl 114ms 2.1ms 87.0MB 200ms 3ms chpl 1.31.0
csharp 6-m.cs 177ms 4.9ms 57.5MB 263ms 30ms dotnet 9.0.303
csharp 6-m.cs 196ms 3.7ms 60.3MB 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 324ms 1.7ms 28.8MB 320ms 0ms chpl 1.31.0
csharp 9.cs 360ms 0.9ms 27.9MB 340ms 7ms dotnet 9.0.303
csharp 8.cs 370ms 0.9ms 9.9MB 357ms 0ms dotnet/aot 9.0.303
csharp 8.cs 420ms 3.5ms 27.6MB 400ms 7ms dotnet 9.0.303
csharp 8.cs 1246ms 2.5ms 22.8MB 1230ms 0ms mono 6.12.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 43ms 1.3ms 28.8MB 40ms 0ms chpl 1.31.0
csharp 8.cs 46ms 1.3ms 9.9MB 33ms 0ms dotnet/aot 9.0.303
csharp 9.cs 93ms 5.0ms 27.8MB 73ms 7ms dotnet 9.0.303
csharp 8.cs 94ms 2.2ms 27.6MB 77ms 3ms dotnet 9.0.303
csharp 8.cs 162ms 3.6ms 22.9MB 150ms 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.8ms 28.3MB 440ms 0ms chpl 1.31.0
csharp 1.cs 3202ms 2.9ms 14.0MB 3100ms 93ms dotnet/aot 9.0.303
csharp 1.cs 3585ms 20ms 38.1MB 3607ms 117ms dotnet 9.0.303

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 114ms 0.4ms 30.4MB 110ms 0ms chpl 1.31.0
csharp 1.cs 754ms 6.4ms 13.4MB 723ms 20ms dotnet/aot 9.0.303
csharp 1.cs 994ms 8.3ms 37.4MB 1083ms 40ms dotnet 9.0.303

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1388ms 7.1ms 246.1MB 1340ms 43ms chpl 1.31.0
csharp 6.cs 1747ms 9.2ms 419.1MB 1657ms 137ms dotnet/aot 9.0.303
csharp 5.cs 2076ms 40ms 441.7MB 2130ms 183ms dotnet 9.0.303
csharp 6.cs 2762ms 30ms 438.5MB 2710ms 177ms dotnet 9.0.303
csharp 5.cs 4211ms 5.4ms 419.7MB 4110ms 150ms dotnet/aot 9.0.303

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 159ms 2.9ms 48.9MB 140ms 10ms chpl 1.31.0
csharp 6.cs 188ms 1.9ms 47.2MB 167ms 13ms dotnet/aot 9.0.303
csharp 5.cs 306ms 7.6ms 73.4MB 267ms 33ms dotnet 9.0.303
csharp 6.cs 388ms 4.4ms 69.8MB 360ms 27ms dotnet 9.0.303
csharp 5.cs 434ms 2.0ms 48.8MB 410ms 17ms dotnet/aot 9.0.303

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1203ms 44ms 29.1MB 1197ms 0ms chpl 1.31.0
csharp 1.cs 2836ms 4.2ms 13.1MB 2800ms 27ms dotnet/aot 9.0.303
csharp 1.cs 2986ms 23ms 35.6MB 3047ms 47ms dotnet 9.0.303

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 308ms 3.0ms 29.1MB 303ms 0ms chpl 1.31.0
csharp 1.cs 716ms 3.8ms 13.0MB 693ms 13ms dotnet/aot 9.0.303
csharp 1.cs 995ms 6.2ms 35.4MB 1087ms 20ms dotnet 9.0.303

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 1885ms 25ms 10.5MB 7280ms 0ms dotnet/aot 9.0.303
chapel 1-m.chpl 1914ms 2.2ms 29.0MB 3800ms 0ms chpl 1.31.0
csharp 3-m.cs 1919ms 3.3ms 30.1MB 7350ms 23ms dotnet 9.0.303
chapel 1.chpl 3718ms 16ms 28.8MB 3713ms 0ms chpl 1.31.0
csharp 3-m.cs 4704ms 149ms 25.7MB 17910ms 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 479ms 1.1ms 10.4MB 1817ms 0ms dotnet/aot 9.0.303
chapel 1-m.chpl 491ms 2.1ms 29.0MB 953ms 0ms chpl 1.31.0
csharp 3-m.cs 534ms 3.5ms 30.0MB 1880ms 17ms dotnet 9.0.303
chapel 1.chpl 945ms 5.5ms 28.6MB 940ms 0ms chpl 1.31.0
csharp 3-m.cs 1244ms 39ms 25.7MB 4693ms 10ms mono 6.12.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 128ms 0.6ms 10.6MB 453ms 0ms dotnet/aot 9.0.303
chapel 1-m.chpl 132ms 0.5ms 28.9MB 240ms 0ms chpl 1.31.0
csharp 3-m.cs 180ms 5.3ms 28.5MB 503ms 7ms dotnet 9.0.303
chapel 1.chpl 246ms 3.8ms 28.8MB 243ms 0ms chpl 1.31.0
csharp 3-m.cs 347ms 1.9ms 25.4MB 1170ms 7ms mono 6.12.0