This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//max has been set to 1000000; | |
private void writeTest(Map<Integer, Integer> map, int max) { | |
long startTime = System.nanoTime(); | |
for(int i = 1; i <= max; i++) { | |
Integer a = new Integer(i); | |
map.put(a, a); | |
} | |
long endTime = System.nanoTime(); | |
double diff = (endTime - startTime)/(double)1000000000; |