PHP versus Java fastest programs Always look at the source code. These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you. regex-redux source secs mem gz busy cpu load PHP 2.88 155,276 816 5.63 44% 79% 33% 38% Java 10.27 635,500 740 29.42 74% 81% 55% 76% pidigits source secs mem gz busy cpu load PHP 2.11 9,064 399 2.14 100% 1% 0% 0% Java 1.83 34,848 764 1.95 99% 1% 4% 2% reverse-complement source secs mem gz busy cpu load PHP 14.19 529,416 438 22.75 35% 54% 49% 21% Java 3.27 714,144 2183 7.54 47% 60% 66% 58% k-nucleotide source secs mem gz busy cpu load PHP 41.32 169,460 1079 134.99 88% 75% 84% 79% Java 9.14 403,576 1812 29.10 87% 72% 74% 86% binary-trees source secs mem gz busy cpu load PHP 51.13 1,584,360 751 187.68 90% 92% 95% 90% Java 8.28 948,040 835 28.20 80% 84% 87% 90% spectral-norm source secs mem gz busy cpu load PHP 33.24 24,100 1152 128.43 95% 98% 98% 95% Java 4.15 36,428 950 16.26 98% 100% 98% 97% fannkuch-redux source secs mem gz busy cpu load PHP 219.15 21,724 1160 870.05 99% 99% 99% 100% Java 16.12 33,168 1282 63.71 100% 98% 99% 98% n-body source secs mem gz busy cpu load PHP 329.52 7,716 1082 348.91 21% 4% 43% 37% Java 21.85 34,112 1489 22.16 1% 0% 0% 100% mandelbrot source secs mem gz busy cpu load PHP 105.40 122,084 875 418.58 99% 99% 100% 99% Java 6.84 76,008 796 26.90 99% 98% 98% 98% fasta source secs mem gz busy cpu load PHP 53.24 7,888 1062 56.38 88% 3% 2% 12% Java 2.22 43,096 2473 6.10 67% 83% 45% 80% PHP PHP 7.4.5 (cli) (built: May 11 2020 13:25:48) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies Java openjdk 14 2020-03-17 OpenJDK Runtime Environment (build 14+36-1461) OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing) all PHP programs & measurements all Java programs & measurements