Chapel VS C# benchmarks

Current benchmark data was generated on Thu Jul 13 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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 1238ms 15ms 384.0MB 1173ms 167ms dotnet/aot 7.0.306
csharp 1.cs 1474ms 24ms 397.6MB 1343ms 190ms dotnet 7.0.306
csharp 1.cs 2201ms 41ms 104.3MB 2517ms 157ms mono 6.12.0
chapel 4.chpl 2278ms 2.2ms 64.2MB 2247ms 20ms chpl 1.31.0
chapel 3.chpl 2393ms 13ms 50.2MB 2373ms 10ms chpl 1.31.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 126ms 4.3ms 72.0MB 100ms 23ms dotnet/aot 7.0.306
csharp 1.cs 153ms 0.8ms 44.0MB 137ms 3ms mono 6.12.0
chapel 4.chpl 220ms 1.8ms 28.0MB 203ms 7ms chpl 1.31.0
chapel 3.chpl 225ms 0.7ms 24.1MB 207ms 7ms chpl 1.31.0
csharp 1.cs 237ms 4.4ms 95.5MB 180ms 33ms dotnet 7.0.306

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 4044ms 31ms 83.4MB 7847ms 37ms chpl 1.31.0
csharp 1-m.cs 4416ms 189ms 106.6MB 7553ms 80ms dotnet 7.0.306
csharp 1.cs timeout 0.0ms 82.8MB 9367ms 53ms dotnet/aot 7.0.306

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 286ms 15ms 54.0MB 510ms 7ms chpl 1.31.0
csharp 1-m.cs 349ms 31ms 61.8MB 570ms 27ms dotnet/aot 7.0.306
csharp 1-m.cs 570ms 46ms 84.9MB 930ms 40ms dotnet 7.0.306

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 97ms 2.0ms 36.0MB 93ms 0ms chpl 1.31.0
csharp 1.cs timeout 0.0ms 39.5MB 4970ms 7ms dotnet 7.0.306
csharp 1.cs timeout 0.0ms 22.6MB 4987ms 3ms dotnet/aot 7.0.306

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 47ms 1.4ms 34.0MB 30ms 7ms chpl 1.31.0
csharp 1.cs 1048ms 11ms 19.0MB 1040ms 3ms dotnet/aot 7.0.306
csharp 1.cs 1108ms 13ms 32.8MB 1063ms 7ms dotnet 7.0.306

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 148ms 2.2ms 32.0MB 253ms 0ms chpl 1.31.0
csharp 5-m.cs 366ms 49ms 57.8MB 560ms 127ms dotnet/aot 7.0.306
csharp 5-m.cs 482ms 25ms 68.6MB 743ms 127ms dotnet 7.0.306
csharp 5-m.cs 482ms 6.9ms 38.3MB 823ms 80ms mono 6.12.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 32ms 1.1ms 32.0MB 30ms 0ms chpl 1.31.0
csharp 5-m.cs 60ms 1.7ms 28.3MB 77ms 17ms dotnet/aot 7.0.306
csharp 5-m.cs 97ms 6.4ms 38.3MB 113ms 37ms mono 6.12.0
csharp 5.cs 108ms 2.9ms 39.9MB 93ms 20ms dotnet 7.0.306

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 6.8ms 0.8ms 12.1MB 0ms 0ms dotnet/aot 7.0.306
chapel 1.chpl 17ms 0.6ms 32.3MB 10ms 0ms chpl 1.31.0
csharp 1.cs 19ms 0.6ms 25.6MB 10ms 0ms mono 6.12.0
csharp 1.cs 59ms 1.9ms 28.8MB 26ms 2ms dotnet 7.0.306

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 933ms 1.9ms 85.0MB 1723ms 13ms chpl 1.31.0
csharp 6-m.cs 971ms 8.0ms 51.8MB 1473ms 27ms dotnet/aot 7.0.306
csharp 6-m.cs 1667ms 172ms 68.9MB 2523ms 20ms mono 6.12.0
csharp 6-m.cs 3820ms 672ms 73.4MB 7300ms 23ms dotnet 7.0.306

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 152ms 4.0ms 42.6MB 177ms 23ms dotnet/aot 7.0.306
chapel 3-m.chpl 163ms 3.3ms 76.4MB 270ms 10ms chpl 1.31.0
csharp 6.cs 233ms 3.9ms 51.1MB 310ms 10ms mono 6.12.0
csharp 6-m.cs 501ms 70ms 61.9MB 793ms 23ms dotnet 7.0.306

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 363ms 1.0ms 32.3MB 353ms 3ms chpl 1.31.0
csharp 9.cs 407ms 0.4ms 29.8MB 380ms 0ms dotnet 7.0.306
csharp 8.cs 498ms 4.0ms 10.1MB 497ms 0ms dotnet/aot 7.0.306
csharp 8.cs 538ms 1.3ms 25.7MB 503ms 0ms dotnet 7.0.306
csharp 8.cs 1108ms 0.6ms 24.9MB 1093ms 0ms mono 6.12.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 55ms 1.2ms 32.3MB 47ms 3ms chpl 1.31.0
csharp 8.cs 57ms 2.2ms 10.1MB 53ms 0ms dotnet/aot 7.0.306
csharp 9.cs 101ms 3.9ms 29.3MB 70ms 3ms dotnet 7.0.306
csharp 8.cs 120ms 8.5ms 29.8MB 77ms 3ms dotnet 7.0.306
csharp 8.cs 133ms 3.3ms 24.9MB 120ms 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 596ms 3.6ms 34.1MB 577ms 3ms chpl 1.31.0
csharp 1.cs 4565ms 6.9ms 76.2MB 4533ms 40ms dotnet/aot 7.0.306
csharp 1.cs 4718ms 42ms 98.2MB 4653ms 87ms dotnet 7.0.306

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 156ms 3.1ms 34.1MB 147ms 0ms chpl 1.31.0
csharp 1.cs 1086ms 9.4ms 75.7MB 1067ms 17ms dotnet/aot 7.0.306
csharp 1.cs 1163ms 10ms 94.9MB 1150ms 40ms dotnet 7.0.306

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1933ms 23ms 221.8MB 1793ms 130ms chpl 1.31.0
csharp 5.cs 3416ms 65ms 527.1MB 3323ms 220ms dotnet 7.0.306
csharp 6.cs 3599ms 14ms 460.5MB 3483ms 167ms dotnet/aot 7.0.306
csharp 6.cs 3887ms 42ms 517.4MB 3740ms 203ms dotnet 7.0.306
csharp 5.cs timeout 0.0ms 182.6MB 4977ms 67ms dotnet/aot 7.0.306

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 216ms 2.4ms 52.8MB 183ms 23ms chpl 1.31.0
csharp 6.cs 376ms 0.7ms 72.6MB 353ms 23ms dotnet/aot 7.0.306
csharp 5.cs 473ms 8.1ms 90.9MB 417ms 37ms dotnet 7.0.306
csharp 6.cs 563ms 2.8ms 89.0MB 510ms 30ms dotnet 7.0.306
csharp 5.cs 688ms 3.6ms 69.6MB 667ms 17ms dotnet/aot 7.0.306

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1543ms 3.8ms 32.4MB 1533ms 0ms chpl 1.31.0
csharp 1.cs 3863ms 8.0ms 73.5MB 3823ms 33ms dotnet/aot 7.0.306
csharp 1.cs 4150ms 3.6ms 95.2MB 4147ms 43ms dotnet 7.0.306

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 404ms 1.8ms 32.4MB 383ms 7ms chpl 1.31.0
csharp 1.cs 997ms 2.8ms 73.4MB 973ms 20ms dotnet/aot 7.0.306
csharp 1.cs 1171ms 2.6ms 92.2MB 1173ms 33ms dotnet 7.0.306

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 2241ms 4.7ms 32.2MB 4403ms 3ms chpl 1.31.0
csharp 3-m.cs 2524ms 7.5ms 13.7MB 4930ms 0ms dotnet/aot 7.0.306
chapel 1.chpl 4378ms 1.3ms 32.3MB 4367ms 3ms chpl 1.31.0
csharp 3-m.cs 4435ms 37ms 34.9MB 8597ms 10ms dotnet 7.0.306
csharp 3.cs timeout 0.0ms 26.5MB 9777ms 7ms mono 6.12.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 592ms 12ms 32.2MB 1117ms 0ms chpl 1.31.0
csharp 3-m.cs 651ms 2.8ms 8.3MB 1233ms 10ms dotnet/aot 7.0.306
chapel 1.chpl 1114ms 1.0ms 32.3MB 1100ms 0ms chpl 1.31.0
csharp 3-m.cs 1230ms 6.9ms 31.6MB 2307ms 3ms dotnet 7.0.306
csharp 3-m.cs 3185ms 152ms 27.8MB 6040ms 0ms mono 6.12.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 165ms 1.0ms 32.2MB 287ms 3ms chpl 1.31.0
csharp 3-m.cs 179ms 2.9ms 12.2MB 310ms 7ms dotnet/aot 7.0.306
chapel 1.chpl 298ms 4.4ms 32.3MB 290ms 0ms chpl 1.31.0
csharp 3.cs 433ms 78ms 29.7MB 567ms 13ms dotnet 7.0.306
csharp 3-m.cs 802ms 3.6ms 29.7MB 1520ms 7ms mono 6.12.0