The classes of the Java Collections Framework belong to the most used part of the JDK. But can the offered list implementations really be used for all purposes? The most used class ArrayList has not only a minimalistic API but also serious performance weaknesses. The first part of the session therefore introduces alternative implementations which excel in all kind of uses. In the second part, key collections are presented as toolbox to increase not only application but also development performance.
The first part of the session introduces collections which addresses the shortcomings of the JDK list implementation.
- GapList is a drop-in replacement for ArrayList which offers efficient access per index and efficient adding/removing at begin/end of the list at the same time. Further performance improvement is realized through exploiting the locality of reference.
- BigList is specially designed to handle real large collections (where large means that it still fits into the heap). It stores data in distinct blocks which are maintained in a specialized tree structure and uses copy-on-write functionality to efficiently copy list of all sizes.
It is shown how these classes are implemented in detail and benchmarks prove that they outperform other known implementations regarding performance and memory usage.
The second part of the session introduces key collections. They add the functionality of keys and constraints to Java collections as known from relational databases. This unique approach allows to define concise data models with just a few lines of code which boosts not only application but also development performance.
Thomas is interested in all facets of software development since the times of the C64. He graduated in 1996 as master in computer science at ETH Zurich, Switzerland. Since then he worked with different technologies and programming languanges including Java and JEE. Thomas currently work as software architect at Swisslog in Buchs, Switzerland.