Php VS C# benchmarks

Current benchmark data was generated on Thu Sep 22 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 1354ms 10ms 390.0MB 1237ms 177ms dotnet 6.0.401
csharp 1.cs 2186ms 21ms 103.2MB 2480ms 190ms mono 6.12.0
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.10

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 151ms 0.2ms 44.4MB 127ms 10ms mono 6.12.0
csharp 1.cs 192ms 5.2ms 95.3MB 140ms 27ms dotnet 6.0.401
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.10

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 19ms 0.3ms 23.8MB 10ms 0ms mono 6.12.0
php 1.php 41ms 0.7ms 47.4MB 14ms 14ms php 8.1.10
csharp 1.cs 51ms 4.5ms 29.0MB 22ms 4ms dotnet 6.0.401

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 932ms 13ms 393.5MB 783ms 183ms dotnet 6.0.401
csharp 2.cs 934ms 20ms 379.2MB 803ms 160ms dotnet 6.0.401
csharp 1.cs 1680ms 15ms 144.9MB 2053ms 127ms mono 6.12.0
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.10

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 255ms 6.6ms 85.1MB 200ms 30ms dotnet 6.0.401
csharp 1.cs 293ms 6.0ms 183.8MB 203ms 67ms dotnet 6.0.401
csharp 1.cs 312ms 3.4ms 72.7MB 280ms 43ms mono 6.12.0
php 1.php timeout 0.0ms 0.0MB 0ms 0ms php 8.1.10