Ruby versus PHP 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. binary-trees source secs mem gz busy cpu load Ruby 44.67 531,624 1096 126.74 79% 60% 73% 72% PHP 51.13 1,584,360 751 187.68 90% 92% 95% 90% fasta source secs mem gz busy cpu load Ruby 51.46 122,960 1069 57.67 20% 22% 47% 23% PHP 53.24 7,888 1062 56.38 88% 3% 2% 12% n-body source secs mem gz busy cpu load Ruby 376.42 25,112 1137 401.06 92% 2% 4% 9% PHP 329.52 7,716 1082 348.91 21% 4% 43% 37% fannkuch-redux source secs mem gz busy cpu load Ruby 307.68 26,776 1444 1,190.76 98% 95% 96% 98% PHP 219.15 21,724 1160 870.05 99% 99% 99% 100% pidigits source secs mem gz busy cpu load Ruby 3.21 369,020 485 5.35 21% 31% 15% 100% PHP 2.11 9,064 399 2.14 100% 1% 0% 0% reverse-complement source secs mem gz busy cpu load Ruby 31.78 511,692 264 34.71 5% 54% 47% 4% PHP 14.19 529,416 438 22.75 35% 54% 49% 21% k-nucleotide source secs mem gz busy cpu load Ruby 106.07 145,640 644 387.67 92% 93% 87% 93% PHP 41.32 169,460 1079 134.99 88% 75% 84% 79% mandelbrot source secs mem gz busy cpu load Ruby 340.43 65,964 931 1,353.94 100% 99% 99% 99% PHP 105.40 122,084 875 418.58 99% 99% 100% 99% spectral-norm source secs mem gz busy cpu load Ruby 154.65 26,296 839 603.60 98% 98% 97% 97% PHP 33.24 24,100 1152 128.43 95% 98% 98% 95% regex-redux source secs mem gz busy cpu load Ruby 15.85 277,116 724 35.00 93% 39% 41% 48% PHP 2.88 155,276 816 5.63 44% 79% 33% 38% Ruby ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] --jit 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 all Ruby programs & measurements all PHP programs & measurements