Chapel VS C# benchmarks

Current benchmark data was generated on Mon Mar 31 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 909ms 8.6ms 192.3MB 903ms 150ms dotnet 9.0.202
csharp 1.cs 978ms 14ms 172.2MB 970ms 130ms dotnet/aot 9.0.202
csharp 1.cs 1684ms 30ms 107.4MB 1873ms 210ms mono 6.12.0
chapel 4.chpl 1962ms 44ms 60.3MB 1950ms 0ms chpl 1.31.0
chapel 3.chpl 2019ms 12ms 60.3MB 2010ms 0ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 120ms 7.8ms 31.5MB 93ms 27ms dotnet/aot 9.0.202
csharp 1.cs 142ms 0.8ms 44.3MB 120ms 13ms mono 6.12.0
chapel 4.chpl 185ms 1.2ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 2.8ms 32.4MB 180ms 0ms chpl 1.31.0
csharp 1.cs 190ms 1.3ms 50.5MB 147ms 40ms dotnet 9.0.202

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 2152ms 52ms 50.1MB 7543ms 63ms dotnet/aot 9.0.202
chapel 1-m.chpl 2192ms 58ms 470.2MB 4273ms 73ms chpl 1.31.0
csharp 1-m.cs 2722ms 77ms 73.0MB 8447ms 103ms dotnet 9.0.202

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 154ms 11ms 18.7MB 453ms 13ms dotnet/aot 9.0.202
chapel 1-m.chpl 181ms 1.3ms 427.0MB 293ms 37ms chpl 1.31.0
csharp 1-m.cs 288ms 24ms 37.3MB 797ms 23ms dotnet 9.0.202

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 71ms 3.7ms 32.4MB 70ms 0ms chpl 1.31.0
csharp 1.cs 4086ms 26ms 18.1MB 4060ms 10ms dotnet/aot 9.0.202
csharp 1.cs 4913ms 49ms 37.9MB 4883ms 17ms dotnet 9.0.202

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 32ms 1.2ms 30.5MB 30ms 0ms chpl 1.31.0
csharp 1.cs 675ms 3.5ms 14.6MB 653ms 3ms dotnet/aot 9.0.202
csharp 1.cs 854ms 1.8ms 33.9MB 833ms 13ms dotnet 9.0.202

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 104ms 1.2ms 28.4MB 190ms 0ms chpl 1.31.0
csharp 5-m.cs 125ms 3.8ms 22.3MB 357ms 80ms dotnet/aot 9.0.202
csharp 5-m.cs 226ms 19ms 44.3MB 470ms 120ms dotnet 9.0.202
csharp 5-m.cs 231ms 6.2ms 46.4MB 667ms 87ms mono 6.12.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 22ms 2.2ms 28.4MB 20ms 0ms chpl 1.31.0
csharp 5-m.cs 24ms 0.7ms 15.6MB 30ms 10ms dotnet/aot 9.0.202
csharp 5-m.cs 64ms 5.1ms 37.0MB 87ms 17ms dotnet 9.0.202
csharp 5-m.cs 72ms 1.6ms 29.1MB 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 7.6ms 2.7ms 9.6MB 0ms 0ms dotnet/aot 9.0.202
chapel 1.chpl 11ms 0.5ms 28.8MB 0ms 0ms chpl 1.31.0
csharp 1.cs 32ms 0.6ms 21.3MB 20ms 0ms mono 6.12.0
csharp 1.cs 45ms 3.1ms 26.3MB 22ms 8ms dotnet 9.0.202

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 454ms 15ms 46.5MB 1217ms 17ms dotnet/aot 9.0.202
chapel 3-m.chpl 746ms 3.8ms 97.0MB 1413ms 10ms chpl 1.31.0
csharp 6-m.cs 749ms 4.8ms 68.6MB 2083ms 33ms dotnet 9.0.202
csharp 6-m.cs 1035ms 14ms 66.4MB 2993ms 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 96ms 4.5ms 36.1MB 153ms 17ms dotnet/aot 9.0.202
chapel 3-m.chpl 112ms 0.7ms 76.9MB 197ms 3ms chpl 1.31.0
csharp 6-m.cs 178ms 6.9ms 57.5MB 253ms 30ms dotnet 9.0.202
csharp 6-m.cs 200ms 1.8ms 50.6MB 387ms 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 319ms 3.7ms 28.8MB 313ms 0ms chpl 1.31.0
csharp 9.cs 358ms 2.8ms 27.6MB 340ms 10ms dotnet 9.0.202
csharp 8.cs 376ms 6.6ms 9.8MB 363ms 0ms dotnet/aot 9.0.202
csharp 8.cs 419ms 3.2ms 27.5MB 400ms 7ms dotnet 9.0.202
csharp 8.cs 1245ms 4.0ms 22.1MB 1227ms 0ms mono 6.12.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 45ms 0.9ms 28.9MB 40ms 0ms chpl 1.31.0
csharp 8.cs 45ms 1.0ms 9.9MB 30ms 0ms dotnet/aot 9.0.202
csharp 9.cs 93ms 3.1ms 27.9MB 73ms 7ms dotnet 9.0.202
csharp 8.cs 93ms 2.6ms 27.5MB 73ms 7ms dotnet 9.0.202
csharp 8.cs 161ms 1.5ms 22.8MB 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 442ms 11ms 30.3MB 437ms 0ms chpl 1.31.0
csharp 1.cs 3216ms 8.5ms 13.9MB 3117ms 97ms dotnet/aot 9.0.202
csharp 1.cs 3599ms 79ms 38.3MB 3620ms 123ms dotnet 9.0.202

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 113ms 0.5ms 30.4MB 110ms 0ms chpl 1.31.0
csharp 1.cs 753ms 3.9ms 13.4MB 720ms 23ms dotnet/aot 9.0.202
csharp 1.cs 980ms 8.6ms 37.5MB 1067ms 33ms dotnet 9.0.202

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1382ms 4.7ms 222.1MB 1337ms 37ms chpl 1.31.0
csharp 6.cs 1735ms 17ms 418.8MB 1640ms 140ms dotnet/aot 9.0.202
csharp 5.cs 2063ms 12ms 443.8MB 2100ms 187ms dotnet 9.0.202
csharp 6.cs 2755ms 94ms 440.5MB 2703ms 170ms dotnet 9.0.202
csharp 5.cs 4239ms 13ms 419.4MB 4147ms 140ms dotnet/aot 9.0.202

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 159ms 3.1ms 48.9MB 140ms 10ms chpl 1.31.0
csharp 6.cs 190ms 1.1ms 47.4MB 167ms 13ms dotnet/aot 9.0.202
csharp 5.cs 281ms 4.5ms 71.2MB 247ms 33ms dotnet 9.0.202
csharp 6.cs 387ms 1.6ms 70.7MB 357ms 27ms dotnet 9.0.202
csharp 5.cs 441ms 1.0ms 47.7MB 420ms 13ms dotnet/aot 9.0.202

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1172ms 4.9ms 29.2MB 1167ms 0ms chpl 1.31.0
csharp 1.cs 2817ms 16ms 13.1MB 2783ms 23ms dotnet/aot 9.0.202
csharp 1.cs 2947ms 18ms 35.4MB 3003ms 53ms dotnet 9.0.202

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 314ms 9.4ms 29.2MB 310ms 0ms chpl 1.31.0
csharp 1.cs 725ms 4.1ms 12.8MB 707ms 10ms dotnet/aot 9.0.202
csharp 1.cs 995ms 5.5ms 35.4MB 1090ms 20ms dotnet 9.0.202

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 1841ms 7.6ms 10.5MB 7173ms 10ms dotnet/aot 9.0.202
chapel 1-m.chpl 1917ms 12ms 28.9MB 3807ms 0ms chpl 1.31.0
csharp 3-m.cs 1930ms 5.0ms 30.1MB 7370ms 13ms dotnet 9.0.202
chapel 1.chpl 3719ms 32ms 28.8MB 3710ms 0ms chpl 1.31.0
csharp 3-m.cs 4705ms 144ms 25.6MB 17887ms 20ms mono 6.12.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 489ms 4.6ms 29.0MB 953ms 0ms chpl 1.31.0
csharp 3-m.cs 492ms 25ms 10.5MB 1780ms 7ms dotnet/aot 9.0.202
csharp 3-m.cs 652ms 40ms 29.8MB 1707ms 13ms dotnet 9.0.202
chapel 1.chpl 934ms 6.5ms 28.8MB 927ms 0ms chpl 1.31.0
csharp 3-m.cs 1237ms 39ms 27.5MB 4640ms 13ms mono 6.12.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 126ms 1.2ms 10.4MB 443ms 0ms dotnet/aot 9.0.202
chapel 1-m.chpl 134ms 2.1ms 28.9MB 240ms 0ms chpl 1.31.0
chapel 1.chpl 248ms 6.1ms 28.8MB 243ms 0ms chpl 1.31.0
csharp 3-m.cs 251ms 4.1ms 28.6MB 460ms 13ms dotnet 9.0.202
csharp 3-m.cs 348ms 0.4ms 25.2MB 1173ms 13ms mono 6.12.0