C# VS Acton benchmarks

Current benchmark data was generated on Fri Dec 09 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (Model 85)

* -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 1458ms 48ms 306.6MB 1327ms 200ms dotnet/aot 7.0.100
csharp 1.cs 1586ms 14ms 429.0MB 1400ms 243ms dotnet 7.0.100
csharp 1.cs 2302ms 13ms 104.9MB 2797ms 160ms mono 6.12.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 142ms 2.1ms 58.4MB 123ms 17ms dotnet/aot 7.0.100
csharp 1.cs 158ms 1.0ms 46.2MB 140ms 7ms mono 6.12.0
csharp 1.cs 274ms 6.9ms 155.8MB 190ms 60ms dotnet 7.0.100

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet 7.0.100
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet/aot 7.0.100

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 353ms 26ms 57.6MB 593ms 23ms dotnet/aot 7.0.100
csharp 1-m.cs 576ms 68ms 143.5MB 813ms 60ms dotnet 7.0.100

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
acton 1.act 548ms 11ms 7.4MB 487ms 43ms actonc 0.14.2
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet 7.0.100
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet/aot 7.0.100

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
acton 1.act 202ms 1.2ms 5.3MB 183ms 3ms actonc 0.14.2
csharp 1.cs 849ms 0.6ms 19.1MB 833ms 7ms dotnet/aot 7.0.100
csharp 1.cs 964ms 2.1ms 109.5MB 903ms 30ms dotnet 7.0.100

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5-m.cs 307ms 11ms 85.0MB 493ms 77ms dotnet/aot 7.0.100
csharp 5-m.cs 472ms 28ms 167.4MB 700ms 117ms dotnet 7.0.100
csharp 5-m.cs 545ms 24ms 60.9MB 900ms 120ms mono 6.12.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5.cs 53ms 5.5ms 20.7MB 60ms 10ms dotnet/aot 7.0.100
csharp 5.cs 98ms 9.0ms 36.3MB 117ms 30ms mono 6.12.0
csharp 5.cs 137ms 9.1ms 111.6MB 113ms 47ms dotnet 7.0.100

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
acton 1.act 5.2ms 3.9ms 3.1MB 0ms 0ms actonc 0.14.2
csharp 1.cs 9.0ms 5.3ms 13.4MB 0ms 0ms dotnet/aot 7.0.100
csharp 1.cs 20ms 1.2ms 25.5MB 10ms 0ms mono 6.12.0
csharp 1.cs 80ms 2.8ms 101.5MB 28ms 26ms dotnet 7.0.100

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2-http2.cs 949ms 4.1ms 204.4MB 973ms 133ms dotnet 7.0.100
csharp 2.cs 975ms 15ms 235.7MB 823ms 540ms dotnet 7.0.100
csharp 1-m.cs 1026ms 50ms 244.1MB 1013ms 530ms dotnet 7.0.100
csharp 2-http3.cs 1307ms 8.1ms 272.7MB 1430ms 347ms dotnet 7.0.100

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 522ms 17ms 159.2MB 387ms 167ms dotnet 7.0.100
csharp 1.cs 594ms 17ms 167.5MB 533ms 187ms dotnet 7.0.100
csharp 2-http2.cs 811ms 6.0ms 161.3MB 750ms 110ms dotnet 7.0.100
csharp 2-http3.cs 909ms 6.6ms 182.4MB 857ms 160ms dotnet 7.0.100

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 414ms 2.4ms 146.9MB 323ms 67ms dotnet 7.0.100
csharp 1.cs 871ms 83ms 215.1MB 757ms 80ms dotnet 7.0.100

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 1869ms 20ms 352.2MB 2007ms 143ms dotnet 7.0.100
csharp 1.cs 2958ms 32ms 861.8MB 2923ms 377ms dotnet 7.0.100

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 983ms 1.5ms 53.1MB 1467ms 17ms dotnet/aot 7.0.100
csharp 6-m.cs 1359ms 21ms 146.0MB 2323ms 60ms dotnet 7.0.100
csharp 6-m.cs 1788ms 3.7ms 70.9MB 2940ms 27ms mono 6.12.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 163ms 3.6ms 43.6MB 190ms 13ms dotnet/aot 7.0.100
csharp 6.cs 263ms 7.4ms 52.9MB 357ms 13ms mono 6.12.0
csharp 6.cs 309ms 2.1ms 133.4MB 343ms 33ms dotnet 7.0.100

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 140ms 3.9ms 8.2MB 133ms 0ms dotnet/aot 7.0.100
csharp 2.cs 192ms 0.4ms 24.4MB 177ms 0ms mono 6.12.0
csharp 2.cs 229ms 2.3ms 102.2MB 170ms 27ms dotnet 7.0.100
csharp 1.cs 1495ms 2.3ms 58.0MB 1473ms 17ms dotnet/aot 7.0.100
csharp 1.cs 1732ms 7.6ms 150.2MB 1660ms 57ms dotnet 7.0.100
csharp 1.cs 3321ms 1.7ms 47.6MB 3277ms 37ms mono 6.12.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 399ms 1.4ms 10.2MB 390ms 0ms dotnet/aot 7.0.100
csharp 2.cs 452ms 0.8ms 102.1MB 400ms 23ms dotnet 7.0.100
csharp 2.cs 527ms 4.5ms 25.3MB 507ms 7ms mono 6.12.0
csharp 1.cs 4556ms 224ms 58.8MB 4533ms 17ms dotnet/aot 7.0.100
csharp 1.cs 4835ms 28ms 146.3MB 4770ms 47ms dotnet 7.0.100
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms mono 6.12.0

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 72ms 1.5ms 8.3MB 70ms 0ms dotnet/aot 7.0.100
csharp 2.cs 109ms 1.3ms 25.2MB 97ms 0ms mono 6.12.0
csharp 2.cs 161ms 3.2ms 104.1MB 103ms 23ms dotnet 7.0.100
csharp 1.cs 4341ms 8.5ms 54.8MB 4317ms 17ms dotnet/aot 7.0.100
csharp 1.cs 4542ms 19ms 141.0MB 4457ms 50ms dotnet 7.0.100
csharp 1.cs 4603ms 12ms 30.8MB 4587ms 0ms mono 6.12.0

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 715ms 24ms 155.3MB 640ms 40ms dotnet 7.0.100
csharp 3.cs 3416ms 3.1ms 111.2MB 3357ms 27ms dotnet 7.0.100
csharp 1.cs 3420ms 1.1ms 108.1MB 3357ms 27ms dotnet 7.0.100
csharp 3.cs 3544ms 6.5ms 15.8MB 3533ms 3ms dotnet/aot 7.0.100
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet/aot 7.0.100
csharp 1.cs timeout 0.0ms 0.0MB 0ms 0ms mono 6.12.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3.cs 156ms 1.8ms 17.1MB 150ms 0ms dotnet/aot 7.0.100
csharp 2.cs 156ms 2.6ms 111.5MB 97ms 33ms dotnet 7.0.100
csharp 1.cs 231ms 0.4ms 11.2MB 227ms 0ms dotnet/aot 7.0.100
csharp 1.cs 234ms 3.9ms 108.3MB 173ms 27ms dotnet 7.0.100
csharp 3.cs 246ms 3.8ms 106.6MB 190ms 30ms dotnet 7.0.100
csharp 1.cs 738ms 0.6ms 28.2MB 723ms 0ms mono 6.12.0

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 901ms 6.1ms 378.6MB 773ms 173ms dotnet/aot 7.0.100
csharp 1.cs 938ms 0.9ms 292.8MB 830ms 150ms dotnet/aot 7.0.100
csharp 2.cs 1106ms 8.3ms 492.0MB 917ms 203ms dotnet 7.0.100
csharp 1.cs 1143ms 7.8ms 503.3MB 910ms 257ms dotnet 7.0.100
csharp 1.cs 1793ms 27ms 143.7MB 2257ms 150ms mono 6.12.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 219ms 1.8ms 141.7MB 150ms 63ms dotnet/aot 7.0.100
csharp 1.cs 256ms 8.8ms 191.0MB 180ms 70ms dotnet/aot 7.0.100
csharp 1.cs 331ms 0.4ms 75.0MB 317ms 33ms mono 6.12.0
csharp 2.cs 384ms 30ms 206.2MB 270ms 90ms dotnet 7.0.100
csharp 1.cs 386ms 4.3ms 253.4MB 280ms 87ms dotnet 7.0.100

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 9.cs 443ms 6.8ms 101.9MB 393ms 20ms dotnet 7.0.100
csharp 8.cs 576ms 0.7ms 8.1MB 573ms 0ms dotnet/aot 7.0.100
csharp 8.cs 617ms 12ms 102.3MB 563ms 23ms dotnet 7.0.100
csharp 8.cs 1279ms 0.9ms 25.0MB 1260ms 0ms mono 6.12.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 8.cs 66ms 3.2ms 10.1MB 60ms 0ms dotnet/aot 7.0.100
csharp 9.cs 126ms 2.4ms 100.2MB 73ms 20ms dotnet 7.0.100
csharp 8.cs 141ms 4.7ms 100.3MB 90ms 23ms dotnet 7.0.100
csharp 8.cs 150ms 0.7ms 25.0MB 133ms 3ms mono 6.12.0

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 652ms 1.6ms 21.7MB 640ms 7ms dotnet/aot 7.0.100
csharp 2.cs 774ms 2.0ms 113.1MB 713ms 37ms dotnet 7.0.100
csharp 1.cs 832ms 15ms 71.8MB 807ms 17ms dotnet/aot 7.0.100
csharp 1.cs 1044ms 19ms 88.6MB 1013ms 17ms mono 6.12.0
csharp 1.cs 1497ms 123ms 158.9MB 1420ms 50ms dotnet 7.0.100
csharp 2.cs 2764ms 5.3ms 32.2MB 2747ms 0ms mono 6.12.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 142ms 1.9ms 27.8MB 133ms 7ms dotnet/aot 7.0.100
csharp 2.cs 155ms 3.5ms 15.3MB 147ms 3ms dotnet/aot 7.0.100
csharp 1.cs 192ms 0.1ms 40.6MB 177ms 3ms mono 6.12.0
csharp 2.cs 239ms 2.1ms 102.4MB 183ms 30ms dotnet 7.0.100
csharp 1.cs 330ms 12ms 116.7MB 267ms 33ms dotnet 7.0.100
csharp 2.cs 673ms 1.6ms 25.7MB 660ms 0ms mono 6.12.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 4334ms 25ms 59.3MB 4293ms 40ms dotnet/aot 7.0.100
csharp 1.cs 4618ms 166ms 154.9MB 4513ms 127ms dotnet 7.0.100
acton 1.act 4902ms 85ms 7.8MB 4477ms 777ms actonc 0.14.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 1029ms 2.6ms 58.5MB 997ms 30ms dotnet/aot 7.0.100
csharp 1.cs 1187ms 52ms 153.5MB 1157ms 63ms dotnet 7.0.100
acton 1.act 1475ms 7.3ms 6.4MB 1327ms 277ms actonc 0.14.2

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5.cs 3224ms 48ms 598.3MB 3107ms 240ms dotnet 7.0.100
csharp 6.cs 3504ms 7.3ms 460.9MB 3360ms 197ms dotnet/aot 7.0.100
csharp 6.cs 3686ms 66ms 594.8MB 3517ms 220ms dotnet 7.0.100
csharp 5.cs timeout 0.0ms 0.0MB 0ms 0ms dotnet/aot 7.0.100

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 370ms 4.5ms 71.2MB 350ms 17ms dotnet/aot 7.0.100
csharp 5.cs 479ms 11ms 168.3MB 400ms 63ms dotnet 7.0.100
csharp 6.cs 540ms 6.0ms 165.5MB 453ms 67ms dotnet 7.0.100
csharp 5.cs 690ms 3.0ms 69.7MB 653ms 33ms dotnet/aot 7.0.100

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 4205ms 2.3ms 57.9MB 4163ms 30ms dotnet/aot 7.0.100
csharp 1.cs 4368ms 54ms 151.8MB 4337ms 50ms dotnet 7.0.100

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 1076ms 3.7ms 55.8MB 1047ms 27ms dotnet/aot 7.0.100
csharp 1.cs 1226ms 7.7ms 149.0MB 1213ms 50ms dotnet 7.0.100

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 2085ms 1.3ms 13.6MB 4057ms 7ms dotnet/aot 7.0.100
csharp 3-m.cs 4113ms 70ms 105.1MB 7603ms 30ms dotnet 7.0.100
csharp 3.cs timeout 0.0ms 0.0MB 0ms 0ms mono 6.12.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 538ms 3.6ms 14.3MB 1020ms 3ms dotnet/aot 7.0.100
csharp 3.cs 1265ms 159ms 104.6MB 1820ms 37ms dotnet 7.0.100
csharp 3-m.cs 2662ms 126ms 27.7MB 5033ms 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 155ms 1.6ms 10.1MB 273ms 3ms dotnet/aot 7.0.100
csharp 3-m.cs 370ms 11ms 104.4MB 563ms 27ms dotnet 7.0.100
csharp 3-m.cs 672ms 0.4ms 29.5MB 1270ms 3ms mono 6.12.0