Php VS Haxe benchmarks

Current benchmark data was generated on Mon Apr 14 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 1342ms 4.5ms 144.0MB 1543ms 60ms haxe/cpp 4.3.6
haxe 2.hx 4432ms 13ms 495.1MB 5033ms 240ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 48.7MB 5777ms 390ms haxe/hl/c 4.3.6
haxe 2.hx timeout 0.0ms 83.0MB 5190ms 670ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 50.3MB 7990ms 417ms haxe/hl/jit 1.15.0
haxe 2.hx timeout 0.0ms 130.8MB 7553ms 747ms haxe/hl/jit 1.15.0
php 1.php timeout 0.0ms 141.9MB 4957ms 27ms php 8.2.28

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 94ms 2.8ms 25.6MB 87ms 10ms haxe/cpp 4.3.6
haxe 2.hx 400ms 3.2ms 58.3MB 433ms 27ms haxe/cpp 4.3.6
php 1.php 625ms 5.0ms 63.0MB 593ms 17ms php 8.2.28
haxe 1.hx 686ms 9.9ms 8.8MB 653ms 50ms haxe/hl/c 4.3.6
haxe 1.hx 718ms 17ms 11.2MB 797ms 63ms haxe/hl/jit 1.15.0
haxe 2.hx 1232ms 144ms 13.7MB 1113ms 163ms haxe/hl/c 4.3.6
haxe 2.hx 1251ms 52ms 25.2MB 1313ms 177ms 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.0ms 0.2ms 2.9MB 0ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 2.3ms 0.3ms 4.4MB 0ms 0ms haxe/cpp 4.3.6
haxe 1.hx 3.8ms 0.4ms 2.9MB 0ms 0ms haxe/hl/jit 1.15.0
php 1.php 50ms 1.2ms 52.5MB 18ms 22ms php 8.2.28

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 902ms 4.4ms 95.1MB 1003ms 43ms haxe/cpp 4.3.6
php 1.php 4002ms 68ms 114.0MB 3960ms 27ms php 8.2.28
haxe 1.hx timeout 0.0ms 32.6MB 5047ms 467ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 55.1MB 6293ms 470ms 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 175ms 6.0ms 26.9MB 177ms 10ms haxe/cpp 4.3.6
php 1.php 851ms 7.8ms 67.1MB 820ms 20ms php 8.2.28
haxe 1.hx 1321ms 16ms 10.8MB 1257ms 140ms haxe/hl/c 4.3.6
haxe 1.hx 1530ms 20ms 20.4MB 1577ms 137ms haxe/hl/jit 1.15.0