Php VS Dart 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
dart 1.dart 932ms 12ms 85.5MB 893ms 40ms dart/exe 3.0.6
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
dart 1.dart 98ms 2.8ms 50.0MB 73ms 13ms dart/exe 3.0.6
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
dart 1.dart 7.6ms 2.3ms 13.2MB 0ms 0ms dart/exe 3.0.6
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
dart 1.dart 475ms 17ms 71.1MB 450ms 23ms dart/exe 3.0.6
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
dart 1.dart 119ms 1.5ms 48.5MB 90ms 17ms dart/exe 3.0.6
php 1.php 1078ms 10ms 66.6MB 1053ms 10ms php 8.2.8