Php VS D benchmarks

Current benchmark data was generated on Thu Feb 01 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
d 1.d 1779ms 2.9ms 312.5MB 1747ms 33ms ldc2 1.36.0
d 1.d 2563ms 15ms 314.0MB 2717ms 53ms dmd 2.106.1
php 1.php timeout 0.0ms 141.7MB 4960ms 27ms php 8.2.14

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 163ms 0.8ms 208.7MB 133ms 13ms ldc2 1.36.0
d 1.d 224ms 4.1ms 210.7MB 193ms 13ms dmd 2.106.1
php 1.php 625ms 4.3ms 63.0MB 593ms 20ms php 8.2.14

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1.7ms 0.1ms 3.0MB 0ms 0ms ldc2 1.36.0
d 1.d 2.2ms 0.1ms 4.9MB 0ms 0ms dmd 2.106.1
php 1.php 52ms 1.8ms 52.0MB 14ms 24ms php 8.2.14

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 976ms 4.9ms 312.5MB 930ms 43ms ldc2 1.36.0
d 1.d 1649ms 16ms 314.4MB 1770ms 37ms dmd 2.106.1
php 1.php 4001ms 93ms 113.7MB 3957ms 27ms php 8.2.14

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 205ms 2.4ms 312.7MB 163ms 27ms ldc2 1.36.0
d 1.d 322ms 2.9ms 314.4MB 293ms 17ms dmd 2.106.1
php 1.php 830ms 5.3ms 66.9MB 793ms 20ms php 8.2.14