edu.umd.cloud9.io
Class BenchmarkCollectionAccess
java.lang.Object
edu.umd.cloud9.io.BenchmarkCollectionAccess
public class BenchmarkCollectionAccess
- extends Object
Benchmark comparing HashMaps, ArrayLists, and raw arrays. Tests one trillion
accesses to a simple three element collection. Sample output:
1000000000 accesses to a 3-element collection:
for HashMap: 17.609 seconds
for ArrayList: 12.313 seconds
for array: 1.219 seconds
|
Method Summary |
static void |
main(String[] args)
Runs this benchmark. |
main
public static void main(String[] args)
- Runs this benchmark.