I tried to run a multithread Java program (in MapReduce style) on Google Nexus 7, and measured the execution time with
System.currentMillis();
I found that the performance varies a lot (w/ 4 threads on Tegra 3 w/ 4 cores), as below:
704
872
729
729
1086
778
1214
1045
749
768
However, when I used the sequential version, I got stable data like this:
928
851
850
842
863
917
873
905
853
870
I thought the garbage collector is concurrent so it also takes a core, is it the reason cause the big variations?
Why sometimes the performance is even much worse than the sequential version?