Php VS C# benchmarks

Current benchmark data was generated on Fri Aug 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 940ms 5.4ms 167.7MB 933ms 127ms dotnet/aot 9.0.303
csharp 1.cs 952ms 25ms 200.7MB 960ms 150ms dotnet 9.0.303
csharp 1.cs 1675ms 21ms 101.3MB 1873ms 200ms mono 6.12.0
php 1.php timeout 0.0ms 141.5MB 4970ms 20ms php 8.2.29

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 115ms 10ms 38.9MB 80ms 27ms dotnet/aot 9.0.303
csharp 1.cs 143ms 2.1ms 42.1MB 120ms 13ms mono 6.12.0
csharp 1.cs 198ms 7.5ms 50.1MB 157ms 30ms dotnet 9.0.303
php 1.php 618ms 4.3ms 62.6MB 587ms 17ms php 8.2.29

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 6.8ms 2.0ms 9.5MB 0ms 0ms dotnet/aot 9.0.303
csharp 1.cs 30ms 1.2ms 21.3MB 20ms 0ms mono 6.12.0
csharp 1.cs 35ms 0.9ms 26.1MB 20ms 4ms dotnet 9.0.303
php 1.php 48ms 1.4ms 52.2MB 18ms 20ms php 8.2.29

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 517ms 7.3ms 121.6MB 480ms 83ms dotnet/aot 9.0.303
csharp 1.cs 571ms 37ms 146.6MB 527ms 110ms dotnet/aot 9.0.303
csharp 2.cs 683ms 21ms 136.3MB 630ms 97ms dotnet 9.0.303
csharp 1.cs 685ms 0.3ms 167.1MB 637ms 120ms dotnet 9.0.303
csharp 1.cs 1259ms 19ms 140.4MB 1457ms 147ms mono 6.12.0
php 1.php 3710ms 17ms 113.8MB 3673ms 27ms php 8.2.29

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 134ms 9.0ms 59.6MB 103ms 37ms dotnet/aot 9.0.303
csharp 1.cs 150ms 4.8ms 73.3MB 120ms 43ms dotnet/aot 9.0.303
csharp 2.cs 259ms 1.2ms 73.3MB 223ms 37ms dotnet 9.0.303
csharp 1.cs 259ms 7.4ms 69.4MB 230ms 37ms mono 6.12.0
csharp 1.cs 272ms 2.0ms 89.9MB 233ms 60ms dotnet 9.0.303
php 1.php 828ms 8.5ms 66.8MB 793ms 23ms php 8.2.29