Php VS D benchmarks

Current benchmark data was generated on Thu Jul 13 2023, 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
d 1.d 2245ms 7.0ms 312.3MB 2157ms 90ms ldc2 1.32.2
d 1.d 3381ms 23ms 314.1MB 3427ms 87ms dmd 2.104.1
php 1.php timeout 0.0ms 141.1MB 4960ms 13ms php 8.2.8

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 248ms 1.3ms 206.3MB 187ms 47ms ldc2 1.32.2
d 1.d 343ms 1.5ms 209.2MB 263ms 60ms dmd 2.104.1
php 1.php 798ms 1.5ms 62.3MB 767ms 17ms php 8.2.8

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 2.1ms 0.6ms 3.0MB 0ms 0ms ldc2 1.32.2
d 1.d 2.7ms 0.7ms 4.8MB 0ms 0ms dmd 2.104.1
php 1.php 46ms 1.9ms 51.3MB 24ms 8ms php 8.2.8

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1260ms 5.4ms 312.3MB 1167ms 90ms ldc2 1.32.2
d 1.d 2301ms 18ms 313.7MB 2297ms 80ms dmd 2.104.1
php 1.php 4890ms 59ms 113.4MB 4853ms 20ms php 8.2.8

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 339ms 2.9ms 312.4MB 223ms 100ms ldc2 1.32.2
d 1.d 555ms 2.9ms 314.2MB 460ms 80ms dmd 2.104.1
php 1.php 1078ms 10ms 66.6MB 1053ms 10ms php 8.2.8