Re: Math in Java
"Lew" wrote:
We don't know the OP's hardware, we don't know the server's hardware, we
don't know the various optimization parameters (undoubtedly the server
uses the '-server' flag), we don't know what effect BlueJ has on the speed
of JVMs under its aegis, we don't have an SSCCE of the OP's code to see if
there are any inefficiencies or errors in it, and we are concluding the
causes for the phenomenon?
Jeremy Watts wrote:
Good point :) I'm running my program on an ordinary laptop (a Sony Vaio),
I'm afraid jargons defeated me for the rest... :)
It is likely that you are seeing a difference in CPU speed between your laptop
(presumably a relatively low-speed CPU) and the server, in addition to other
factors. I agree with Kenneth that the JVM startup is a likely culprit. Most
IDEs have an impact on the speed of code they start, compared to starting the
same program from the command line. You perhaps did not optimize your program
(e.g., '-server' flag), and absent your source code we cannot determine if
your implementation is correct or even slightly close to optimal.
To answer your original question:
Would you say the main factor explaining the difference between the
execution speeds, is the fact that I am running Java and the site
is likely running native machine code on a server (if that indeed
is what it is doing)?
No. I wouldn't make any conclusions about that difference based on the utter
paucity of information you've provided.
--
Lew