Could someone tell me why Java is faster than PHP
I've been doing a lot of reading because of Harry Fuecks Pro PHP Rant
In my reading, I tripped up on something.
George Schnossnagle says here that he believes Java is faster than PHP.
I always believed so too because (don't laugh)
Notice how PHP being naturally slower than Java (something I believe to be true) comes in last?
1. Java is used in Enterprise systems so it must be fast
2. I thought because Java is compiled .... it would be faster.
Well after doing a little research over at wikipedia
I found this.
Apparently compiled Java bytecode is interpreted too (just like PHP) so what makes Java faster than PHP?
This is achieved by most Java compilers
by compiling the Java language code "halfway" to bytecode
(specifically Java bytecode
) —simplified machine instructions specific to the Java platform. The code is then run on a virtual machine
(VM), a program written in native code on the host hardware that interprets
and executes generic Java bytecode.
Is it the compiler or JVM runtime incorporated into J2EE (am I throwing around words I do not understand?)
I really would like to know the answer to this.