Chapel VS C# benchmarks

Current benchmark data was generated on Tue Mar 25 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 987ms 29ms 207.3MB 987ms 150ms dotnet 9.0.202
csharp 1.cs 1059ms 17ms 186.1MB 1060ms 143ms dotnet/aot 9.0.202
csharp 1.cs 1745ms 50ms 99.7MB 1947ms 213ms mono 6.12.0
chapel 3.chpl 2069ms 6.5ms 60.3MB 2057ms 0ms chpl 1.31.0
chapel 4.chpl 2076ms 200ms 62.2MB 2063ms 3ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 132ms 9.0ms 34.1MB 97ms 30ms dotnet/aot 9.0.202
csharp 1.cs 151ms 3.1ms 44.1MB 127ms 10ms mono 6.12.0
chapel 3.chpl 188ms 1.6ms 32.2MB 180ms 0ms chpl 1.31.0
chapel 4.chpl 196ms 21ms 32.3MB 190ms 0ms chpl 1.31.0
csharp 1.cs 202ms 3.4ms 50.0MB 160ms 37ms 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 2245ms 111ms 50.1MB 7953ms 83ms dotnet/aot 9.0.202
chapel 1-m.chpl 2266ms 93ms 525.8MB 4393ms 80ms chpl 1.31.0
csharp 1-m.cs 2817ms 51ms 72.8MB 8863ms 100ms dotnet 9.0.202

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 169ms 13ms 18.8MB 480ms 20ms dotnet/aot 9.0.202
chapel 1-m.chpl 198ms 4.8ms 494.6MB 317ms 50ms chpl 1.31.0
csharp 1-m.cs 272ms 7.4ms 37.8MB 760ms 20ms dotnet 9.0.202

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 73ms 2.7ms 32.5MB 70ms 0ms chpl 1.31.0
csharp 1.cs 4104ms 3.1ms 18.4MB 4080ms 10ms dotnet/aot 9.0.202
csharp 1.cs 4967ms 13ms 37.5MB 4937ms 20ms dotnet 9.0.202

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 34ms 1.3ms 30.5MB 30ms 0ms chpl 1.31.0
csharp 1.cs 682ms 1.1ms 14.5MB 663ms 3ms dotnet/aot 9.0.202
csharp 1.cs 869ms 16ms 34.0MB 843ms 10ms 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 106ms 1.8ms 28.3MB 190ms 0ms chpl 1.31.0
csharp 5-m.cs 129ms 4.7ms 26.3MB 357ms 83ms dotnet/aot 9.0.202
csharp 5-m.cs 201ms 12ms 39.6MB 470ms 117ms dotnet 9.0.202
csharp 5-m.cs 235ms 14ms 38.1MB 660ms 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 1.3ms 28.4MB 20ms 0ms chpl 1.31.0
csharp 5-m.cs 25ms 1.9ms 16.5MB 33ms 20ms dotnet/aot 9.0.202
csharp 5-m.cs 62ms 1.0ms 37.3MB 87ms 20ms dotnet 9.0.202
csharp 5-m.cs 72ms 0.5ms 31.5MB 103ms 27ms mono 6.12.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 8.7ms 2.7ms 9.4MB 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.6MB 20ms 0ms mono 6.12.0
csharp 1.cs 36ms 1.2ms 26.1MB 20ms 6ms 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 455ms 4.7ms 46.3MB 1203ms 17ms dotnet/aot 9.0.202
chapel 3-m.chpl 747ms 1.1ms 87.0MB 1410ms 10ms chpl 1.31.0
csharp 6-m.cs 766ms 12ms 68.1MB 2110ms 37ms dotnet 9.0.202
csharp 6-m.cs 1021ms 12ms 68.9MB 2963ms 27ms 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 95ms 5.4ms 36.4MB 153ms 17ms dotnet/aot 9.0.202
chapel 3-m.chpl 116ms 0.5ms 87.0MB 200ms 3ms chpl 1.31.0
csharp 6-m.cs 180ms 2.8ms 57.0MB 273ms 30ms dotnet 9.0.202
csharp 6-m.cs 200ms 4.3ms 58.4MB 383ms 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 326ms 5.3ms 28.9MB 317ms 0ms chpl 1.31.0
csharp 9.cs 364ms 3.9ms 27.8MB 340ms 7ms dotnet 9.0.202
csharp 8.cs 372ms 2.5ms 9.9MB 357ms 0ms dotnet/aot 9.0.202
csharp 8.cs 422ms 2.6ms 27.5MB 400ms 10ms dotnet 9.0.202
csharp 8.cs 1256ms 5.3ms 22.3MB 1240ms 3ms mono 6.12.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 45ms 2.3ms 28.8MB 40ms 0ms chpl 1.31.0
csharp 8.cs 47ms 0.7ms 9.8MB 30ms 0ms dotnet/aot 9.0.202
csharp 8.cs 96ms 1.3ms 27.5MB 80ms 10ms dotnet 9.0.202
csharp 9.cs 97ms 4.6ms 27.8MB 73ms 10ms dotnet 9.0.202
csharp 8.cs 165ms 1.2ms 20.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 446ms 2.3ms 28.4MB 440ms 0ms chpl 1.31.0
csharp 1.cs 3274ms 18ms 13.9MB 3170ms 103ms dotnet/aot 9.0.202
csharp 1.cs 3581ms 55ms 38.1MB 3593ms 127ms dotnet 9.0.202

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 116ms 1.2ms 30.3MB 110ms 0ms chpl 1.31.0
csharp 1.cs 760ms 1.6ms 13.5MB 723ms 23ms dotnet/aot 9.0.202
csharp 1.cs 993ms 12ms 37.8MB 1093ms 37ms 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 1399ms 7.7ms 222.1MB 1347ms 43ms chpl 1.31.0
csharp 6.cs 1772ms 2.8ms 418.4MB 1670ms 153ms dotnet/aot 9.0.202
csharp 5.cs 2097ms 27ms 445.0MB 2143ms 193ms dotnet 9.0.202
csharp 6.cs 2712ms 14ms 440.8MB 2663ms 170ms dotnet 9.0.202
csharp 5.cs 4384ms 78ms 419.4MB 4280ms 153ms 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 164ms 2.9ms 49.0MB 150ms 10ms chpl 1.31.0
csharp 6.cs 191ms 2.2ms 47.5MB 167ms 17ms dotnet/aot 9.0.202
csharp 5.cs 299ms 1.6ms 72.7MB 270ms 33ms dotnet 9.0.202
csharp 6.cs 395ms 5.4ms 70.3MB 363ms 27ms dotnet 9.0.202
csharp 5.cs 445ms 2.1ms 47.0MB 420ms 17ms 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 1181ms 3.6ms 29.2MB 1177ms 0ms chpl 1.31.0
csharp 1.cs 2855ms 23ms 13.0MB 2817ms 27ms dotnet/aot 9.0.202
csharp 1.cs 2964ms 16ms 35.3MB 3037ms 40ms dotnet 9.0.202

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 308ms 2.9ms 29.0MB 303ms 0ms chpl 1.31.0
csharp 1.cs 723ms 0.6ms 13.1MB 700ms 10ms dotnet/aot 9.0.202
csharp 1.cs 1007ms 8.8ms 35.4MB 1100ms 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 1878ms 31ms 10.4MB 7237ms 7ms dotnet/aot 9.0.202
chapel 1-m.chpl 1928ms 19ms 28.8MB 3830ms 0ms chpl 1.31.0
csharp 3-m.cs 2004ms 130ms 29.9MB 7250ms 13ms dotnet 9.0.202
chapel 1.chpl 3725ms 17ms 28.8MB 3720ms 0ms chpl 1.31.0
csharp 3-m.cs 4769ms 182ms 27.6MB 18443ms 23ms mono 6.12.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 476ms 2.3ms 10.3MB 1813ms 3ms dotnet/aot 9.0.202
chapel 1-m.chpl 492ms 0.6ms 28.5MB 957ms 0ms chpl 1.31.0
csharp 3-m.cs 532ms 2.2ms 29.9MB 1877ms 13ms dotnet 9.0.202
chapel 1.chpl 940ms 1.1ms 28.8MB 933ms 0ms chpl 1.31.0
csharp 3-m.cs 1261ms 106ms 27.4MB 4513ms 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 128ms 0.9ms 10.3MB 447ms 3ms dotnet/aot 9.0.202
chapel 1-m.chpl 135ms 1.0ms 28.9MB 240ms 0ms chpl 1.31.0
csharp 3-m.cs 178ms 0.4ms 28.5MB 500ms 13ms dotnet 9.0.202
chapel 1.chpl 247ms 2.4ms 28.8MB 240ms 0ms chpl 1.31.0
csharp 3-m.cs 352ms 1.3ms 25.5MB 1173ms 10ms mono 6.12.0