IIUC, Java is compiled into a specialized form of bytecode (not to machine language, for example, as c is), and is then interpreted at runtime by the JVM. I don't know too much about it, though.
IIUC, Java is compiled into a specialized form of bytecode (not to machine language, for example, as c is), and is then interpreted at runtime by the JVM. I don't know too much about it, though.
Yes, then JVM will interpret the code into machine language..
Then why it says Java is faster than Php ,
PHP is only interpreting the human language(code) into machine codes and execute the program (1 step process)
Java is first compiling pgrm codes into byte code and then interpreted by JVM at run time (2 step process),
even if compilation is done only once, then interpretation retains, then the statement JAVA FASTER is false ?
Other wise i think interpreting byte codes is faster than interpreting human language codes directly,
Last edited by letom; 12-03-2013 at 06:14 AM.
You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God
It doesn't matter how many steps there are. What matters is how fast the code runs.
C++ runs faster than PHP because PHP is inefficient in design, mostly because it isn't compiled into machine code.
So for Java the question is how fast compiled Java runs, not how quickly it is converted/compiled.
Last edited by djr33; 12-05-2013 at 12:50 AM. Reason: typo
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Thanks.. Hope future versions of php will solve these issues and additionally make it fully completable to develop client side applications
You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God
That's not really possible. The goals of PHP are not to make it the fastest language. The goal is to make it easy to use on webservers. Therefore, it is not the best language to run extremely complicated or processor-intensive code. But usually websites don't require that. That's best in C++ or Java, when you are creating an application to run natively on the computer.Hope future versions of php will solve these issues
This is not what PHP is designed to do. Just like cars are not designed to fly in the air or float in water, PHP is not designed to work client-side. There are many reasons: 1) it is secure on the server, and would not be secure client-side (like JS is not secure); 2) it is meant to work on a server with databases and other server-side things; and 3) it is designed as a "hypertext pre-processor"-- it is designed to generate webpages (HTML output), not to interact with a user.and additionally make it fully completable to develop client side applications
However, in the future technologies like AJAX (or perhaps node.js) will be improved and extended so that interaction between client-side scripting (like JS) and server-side programming (like PHP) is made much smoother. Really, this is the whole idea of (or at least one major aspect of) "Web 2.0".
But PHP will never be a client-side technology. Or at least it will not be client-side without such major changes that it would no longer really be PHP any more. Maybe it would have the same name, but that would probably be more confusing than helpful.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks