Php VS C# benchmarks

Current benchmark data was generated on Sun Jun 01 2025, 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 901ms 14ms 197.1MB 893ms 147ms dotnet 9.0.300
csharp 1.cs 1061ms 140ms 164.4MB 963ms 127ms dotnet/aot 9.0.300
csharp 1.cs 1725ms 105ms 103.6MB 1900ms 227ms mono 6.12.0
php 1.php timeout 0.0ms 141.6MB 4967ms 20ms php 8.2.28

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 141ms 1.3ms 46.1MB 120ms 10ms mono 6.12.0
csharp 1.cs 175ms 44ms 31.8MB 100ms 33ms dotnet/aot 9.0.300
csharp 1.cs 191ms 4.8ms 49.7MB 147ms 37ms dotnet 9.0.300
php 1.php 612ms 2.9ms 62.7MB 577ms 20ms php 8.2.28

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 7.8ms 2.1ms 9.5MB 0ms 0ms dotnet/aot 9.0.300
csharp 1.cs 30ms 0.5ms 21.7MB 18ms 2ms mono 6.12.0
csharp 1.cs 34ms 1.1ms 26.1MB 20ms 2ms dotnet 9.0.300
php 1.php 44ms 1.2ms 52.5MB 16ms 18ms php 8.2.28

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 525ms 14ms 120.6MB 483ms 83ms dotnet/aot 9.0.300
csharp 1.cs 577ms 8.1ms 144.9MB 530ms 113ms dotnet/aot 9.0.300
csharp 2.cs 666ms 14ms 136.1MB 620ms 100ms dotnet 9.0.300
csharp 1.cs 749ms 4.3ms 166.8MB 690ms 137ms dotnet 9.0.300
csharp 1.cs 1280ms 4.1ms 144.6MB 1447ms 180ms mono 6.12.0
php 1.php 3755ms 29ms 113.8MB 3717ms 27ms php 8.2.28

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 127ms 4.7ms 57.1MB 100ms 30ms dotnet/aot 9.0.300
csharp 1.cs 154ms 5.1ms 74.8MB 123ms 50ms dotnet/aot 9.0.300
csharp 2.cs 262ms 8.0ms 75.8MB 220ms 43ms dotnet 9.0.300
csharp 1.cs 264ms 2.4ms 69.4MB 240ms 33ms mono 6.12.0
csharp 1.cs 276ms 3.6ms 93.0MB 247ms 53ms dotnet 9.0.300
php 1.php 838ms 4.0ms 67.2MB 800ms 20ms php 8.2.28