Php VS Haxe benchmarks

Current benchmark data was generated on Tue Jul 01 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 1350ms 7.6ms 143.9MB 1543ms 67ms haxe/cpp 4.3.6
haxe 2.hx 4488ms 22ms 495.1MB 5047ms 253ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 48.6MB 5730ms 390ms haxe/hl/c 4.3.6
haxe 2.hx timeout 0.0ms 83.0MB 5197ms 670ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 50.4MB 7673ms 410ms haxe/hl/jit 1.16.0
haxe 2.hx timeout 0.0ms 130.9MB 7593ms 773ms haxe/hl/jit 1.16.0
php 1.php timeout 0.0ms 141.6MB 4963ms 20ms php 8.2.28

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 91ms 0.4ms 25.6MB 83ms 10ms haxe/cpp 4.3.6
haxe 2.hx 411ms 5.4ms 58.3MB 453ms 27ms haxe/cpp 4.3.6
php 1.php 614ms 0.1ms 62.7MB 583ms 17ms php 8.2.28
haxe 1.hx 668ms 23ms 8.7MB 637ms 50ms haxe/hl/c 4.3.6
haxe 1.hx 713ms 53ms 11.2MB 790ms 57ms haxe/hl/jit 1.16.0
haxe 2.hx 979ms 37ms 13.6MB 883ms 150ms haxe/hl/c 4.3.6
haxe 2.hx 1273ms 68ms 25.0MB 1337ms 187ms haxe/hl/jit 1.16.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 1.8ms 0.1ms 2.9MB 0ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 2.2ms 0.2ms 4.4MB 0ms 0ms haxe/cpp 4.3.6
haxe 1.hx 3.3ms 0.1ms 2.8MB 0ms 0ms haxe/hl/jit 1.16.0
php 1.php 48ms 2.3ms 52.2MB 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 918ms 0.6ms 95.0MB 1023ms 43ms haxe/cpp 4.3.6
php 1.php 3860ms 168ms 113.6MB 3810ms 33ms php 8.2.28
haxe 1.hx timeout 0.0ms 32.6MB 5057ms 457ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 55.1MB 6137ms 470ms haxe/hl/jit 1.16.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 186ms 8.5ms 26.6MB 190ms 3ms haxe/cpp 4.3.6
php 1.php 857ms 20ms 66.8MB 823ms 20ms php 8.2.28
haxe 1.hx 1401ms 85ms 10.7MB 1320ms 157ms haxe/hl/c 4.3.6
haxe 1.hx 1668ms 5.5ms 20.3MB 1743ms 150ms haxe/hl/jit 1.16.0