Php VS C# benchmarks

Current benchmark data was generated on Fri May 20 2022, 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 1400ms 22ms 390.6MB 1260ms 180ms dotnet 6.0.300
csharp 1.cs 2295ms 25ms 103.2MB 2610ms 193ms mono 6.12.0
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.5

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 160ms 4.1ms 44.7MB 143ms 3ms mono 6.12.0
csharp 1.cs 194ms 16ms 93.0MB 140ms 20ms dotnet 6.0.300
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.5

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 19ms 0.4ms 24.3MB 10ms 0ms mono 6.12.0
php 1.php 41ms 0.5ms 47.8MB 18ms 8ms php 8.1.5
csharp 1.cs 50ms 4.7ms 32.9MB 24ms 2ms dotnet 6.0.300

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 908ms 3.1ms 378.4MB 773ms 167ms dotnet 6.0.300
csharp 1.cs 922ms 7.6ms 395.6MB 780ms 173ms dotnet 6.0.300
csharp 1.cs 1729ms 34ms 153.0MB 2073ms 143ms mono 6.12.0
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.5

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 253ms 3.7ms 94.1MB 203ms 30ms dotnet 6.0.300
csharp 1.cs 284ms 3.0ms 183.8MB 197ms 67ms dotnet 6.0.300
csharp 1.cs 315ms 3.6ms 74.8MB 283ms 40ms mono 6.12.0
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.5