Php VS Haxe benchmarks

Current benchmark data was generated on Sun Apr 06 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
haxe 1.hx 1325ms 15ms 144.0MB 1503ms 73ms haxe/cpp 4.3.6
haxe 2.hx 4437ms 32ms 495.1MB 4970ms 273ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 48.6MB 5723ms 403ms haxe/hl/c 4.3.6
haxe 2.hx timeout 0.0ms 83.0MB 5140ms 663ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 50.4MB 7903ms 450ms haxe/hl/jit 1.15.0
haxe 2.hx timeout 0.0ms 131.0MB 7453ms 767ms haxe/hl/jit 1.15.0
php 1.php timeout 0.0ms 142.0MB 4960ms 27ms php 8.2.28

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 91ms 2.2ms 25.6MB 87ms 10ms haxe/cpp 4.3.6
haxe 2.hx 402ms 9.2ms 58.3MB 440ms 23ms haxe/cpp 4.3.6
php 1.php 623ms 8.1ms 62.7MB 583ms 23ms php 8.2.28
haxe 1.hx 687ms 22ms 8.9MB 650ms 53ms haxe/hl/c 4.3.6
haxe 1.hx 703ms 7.5ms 11.2MB 770ms 57ms haxe/hl/jit 1.15.0
haxe 2.hx 1147ms 42ms 13.6MB 1037ms 160ms haxe/hl/c 4.3.6
haxe 2.hx 1333ms 49ms 25.0MB 1357ms 193ms haxe/hl/jit 1.15.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 2.1ms 0.3ms 2.8MB 0ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 2.5ms 0.3ms 4.5MB 0ms 0ms haxe/cpp 4.3.6
haxe 1.hx 3.7ms 0.3ms 2.9MB 0ms 0ms haxe/hl/jit 1.15.0
php 1.php 50ms 2.2ms 52.8MB 18ms 20ms php 8.2.28

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 938ms 11ms 95.0MB 1047ms 50ms haxe/cpp 4.3.6
php 1.php 3745ms 49ms 114.2MB 3707ms 27ms php 8.2.28
haxe 1.hx timeout 0.0ms 32.8MB 5053ms 460ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 55.1MB 6110ms 480ms haxe/hl/jit 1.15.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 184ms 2.1ms 26.6MB 187ms 13ms haxe/cpp 4.3.6
php 1.php 836ms 9.8ms 67.4MB 803ms 20ms php 8.2.28
haxe 1.hx 1346ms 63ms 10.7MB 1277ms 147ms haxe/hl/c 4.3.6
haxe 1.hx 1652ms 78ms 20.3MB 1720ms 147ms haxe/hl/jit 1.15.0