/mobile Handheld Friendly website

vs

 1 : Are the Python 3 programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Python 3 program used compared to the fastest PHP program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the Python 3 programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Python 3 program used compared to the fastest PHP program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Python 3 used what fraction? used how many times more? 
Benchmark Time Memory Code
 binary-trees †1/4±±
 reverse-complement±±
 pidigits± 1/2
 regex-dna±1/2
 n-body± ±
 fannkuch-redux± ±
 mandelbrot ±
 spectral-norm 1/3
 fasta ±
 k-nucleotide †±1/2
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/4±±

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the Python 3 programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest Python 3 program are shown for comparison against measurements of the fastest PHP program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 binary-trees 
Python 3526.56139.26688,512626  93% 96% 96% 94% †
PHP547.79548.40546,272472  72% 24% 5% 4% †
 reverse-complement 
Python 36.536.55781,144325  0% 1% 0% 100%
PHP7.837.85443,496262  0% 100% 0% 0%
 pidigits 
Python 33.053.065,332256  1% 1% 0% 100%
PHP2.782.793,412394  0% 0% 1% 100%
 regex-dna 
Python 323.8111.01248,260478  37% 72% 45% 64%
PHP26.749.65150,664832  60% 53% 95% 70%
 n-body 
Python 3984.27984.534,2521181  0% 100% 0% 0%
PHP741.54741.842,5961082  0% 38% 62% 0%
 fannkuch-redux 
Python 34,000.061,012.0627,840797  99% 99% 98% 100%
PHP2,847.18744.7210,5641150  91% 93% 99% 100%
 mandelbrot 
Python 31,837.41483.667,488777  100% 94% 93% 94%
PHP1,159.81290.9875,728863  100% 100% 100% 100%
 spectral-norm 
Python 31,026.66258.4230,260437  99% 99% 99% 99%
PHP430.11108.8614,3721193  99% 99% 99% 99%
 fasta 
Python 3241.56246.324,324788  30% 24% 15% 33%
PHP68.8868.912,5961110  0% 90% 10% 1%
 k-nucleotide 
Python 3488.50161.33364,488647  89% 60% 98% 56% †
PHP45.7940.06246,9521036  4% 90% 14% 7% †
 fasta-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Python 3 programs for these benchmarks?

Remember - those are just the fastest Python 3 and PHP programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Python 3.

Maybe one of those other Python 3 programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Python 3 and PHP programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Python 3 : the new Python 

Python 3.4.0 (default, Mar 17 2014, 08:23:52) [GCC 4.8.1] on linux

"3.x is the newest branch of Python and the intended future of the language."

"Van Rossum: Python is not too slow"

Home Page: Python 3.4.0 was released on March 16th, 2014.

Revised BSD license

  Home   Conclusions   License   Play