4 ms·
Perhaps the problems are with the way the Java program is written and run? Back in 2012: "5) The idea is to help you understand that you aren't comparing what
by igouy 10y ago
Perhaps the problems are with the way the Java program is written and run?
Back in 2012:
"5) The idea is to help you understand that you aren't comparing what you say you're comparing.
If your intention is to compare time taken to grow a list, then shouldn't you start with lists that are the same size, and start with program heap that's the same size, and use the same max heap size?
user+sys for your Java program = 20.56s
But change
ArrayList<Integer> s = new ArrayList<Integer>();
to
ArrayList<Integer> s = new ArrayList<Integer>(8192);
and run with
java -Xms1G PrimeNumbersBenchmarkApp
user+sys = 6.9s
I don't think you're comparing what you say you're comparing."
http://www.famzah.net/download/langs-performance/java-discussion-by-Isaac-Gouy/ http://www.famzah.net/download/langs-performance/java-discus...