This Is AuburnElectronic Theses and Dissertations

Energy Profiles of Java Collections Classes




Hasan, Samir

Type of Degree

Master's Thesis


Computer Science


We created detailed profiles of the energy consumed by common operations done on Java List, Map, and Set abstractions. The results show that the alternative data types for these abstractions differ significantly in terms of energy consumption depending on the operations. For example, an ArrayList consumes less energy than a LinkedList if items are inserted at the middle or at the end, but consumes more energy than a LinkedList if items are inserted at the start of the list. To explain the results, we explored memory usage and bytecode executed during an operation. Expensive computation tasks in bytecode traces appeared to have energy impact, but memory usage did not contribute. We evaluated our profiles by using them to selectively replace Collections types used in six applications and libraries. We found that choosing a wrong Collections type, as indicated by our profiles, can cost as much as 300% more energy than the more efficient choice. Our work shows that the usage context of a data structure and our measured energy profiles can be used to decide between alternative Collections implementations for energy efficiency.