Bruce Eckel had an interesting post on performance testing the collection classes. Basically, he is comparing the different classes, running a myriad of insertion and delete tests and then timing the operation. He uses
System.nanoTime() and to quote him, “typically nanoTime() produces values with a granularity that is greater than one (and this granularity will vary with machines and operating systems)”.
Comments