When I execute a simple code example through Eclipse (version 3.5.2, on Ubuntu 10.04, java version "1.6.0_20", OpenJDK working environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1 ~ 10.04.2) OpenJDK Server VM (build 19.0-b09, mixed mode)), it takes about 10 seconds. When I execute it from my shell (using the same priority and version of java), it takes about 40 seconds.
for (int i = 0; i<1000*1000; i++) { System.out.println(Math.cos(i)); }
I also tried other programs, changing the execution time and output volume: each of them was much slower in the shell. It did not depend on the order of execution. The minimum percentage difference was 85 seconds in Eclipse versus 145 seconds in the shell for a program with very little output.
What reason?
Davefar
source share