On 05/02/2019 16:36, Noel Frankinet wrote: > When a C++ program is slower than its counterpart in Java, its always > because the C++ implementation is weak.
Never underestimate the developer to f**k things up. :-) No matter the language, some developers can always cause havoc. > Java cannot be faster than machine code and a good C++ implementation must > be equivalent to machine code. These days the Java Runtime (JRE) compiles the byte code into machine code and then runs the machine code version - thus equivalent to what C/C++ compilers generated. Java has some benefits in the fact that the Byte Code includes lots of metadata to help the JRE, JIT etc to generate very optimised machine code. While your application is running, the JRE can also preempt what is going to be loaded soon, and pre-compiles such code into optimised machine code too. Like I said, the Java of today is a far cry from the Java of the 90's! What is also mind boggling is that you can even run (link) java classes generated back in the 90's and still use them in your code compiled today! (without having the original .java files) Backwards compatibly to the max. :) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk