Php VS Swift 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
swift 1.swift 2559ms 11ms 52.7MB 2533ms 10ms swift 5.8.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
swift 1.swift 237ms 3.5ms 10.4MB 223ms 0ms swift 5.8.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
swift 1.swift 2.0ms 0.6ms 4.7MB 0ms 0ms swift 5.8.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
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
php 1.php 1078ms 10ms 66.6MB 1053ms 10ms php 8.2.8