Php VS C# benchmarks

Current benchmark data was generated on Tue Dec 31 2024, 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 886ms 4.1ms 166.1MB 870ms 127ms dotnet/aot 9.0.101
csharp 1.cs 889ms 12ms 194.2MB 897ms 133ms dotnet 9.0.101
csharp 1.cs 1646ms 54ms 103.5MB 1847ms 210ms mono 6.12.0
php 1.php timeout 0.0ms 142.0MB 4957ms 30ms php 8.2.27

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 117ms 12ms 45.7MB 77ms 30ms dotnet/aot 9.0.101
csharp 1.cs 136ms 3.4ms 44.2MB 107ms 17ms mono 6.12.0
csharp 1.cs 202ms 3.7ms 66.8MB 143ms 40ms dotnet 9.0.101
php 1.php 577ms 3.1ms 63.1MB 543ms 17ms php 8.2.27

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 18ms 11ms 15.5MB 0ms 0ms dotnet/aot 9.0.101
csharp 1.cs 30ms 0.2ms 23.4MB 18ms 2ms mono 6.12.0
csharp 1.cs 34ms 1.5ms 32.5MB 18ms 6ms dotnet 9.0.101
php 1.php 46ms 1.1ms 52.5MB 14ms 16ms php 8.2.27

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 521ms 13ms 123.3MB 463ms 80ms dotnet/aot 9.0.101
csharp 1.cs 549ms 12ms 154.4MB 487ms 123ms dotnet/aot 9.0.101
csharp 2.cs 657ms 22ms 142.9MB 603ms 97ms dotnet 9.0.101
csharp 1.cs 663ms 5.2ms 169.5MB 603ms 123ms dotnet 9.0.101
csharp 1.cs 1246ms 80ms 142.6MB 1450ms 163ms mono 6.12.0
php 1.php 3523ms 15ms 113.7MB 3480ms 23ms php 8.2.27

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 129ms 11ms 62.5MB 93ms 33ms dotnet/aot 9.0.101
csharp 1.cs 147ms 8.4ms 80.9MB 113ms 43ms dotnet/aot 9.0.101
csharp 1.cs 247ms 3.2ms 71.3MB 207ms 43ms mono 6.12.0
csharp 1.cs 261ms 6.2ms 98.0MB 220ms 53ms dotnet 9.0.101
csharp 2.cs 268ms 26ms 80.7MB 217ms 40ms dotnet 9.0.101
php 1.php 785ms 12ms 67.1MB 747ms 27ms php 8.2.27