Energy Profiles of Java Collections Classes
Title | Energy Profiles of Java Collections Classes |
Publication Type | Conference Paper |
Year of Publication | 2016 |
Authors | Hasan, Samir, King, Zachary, Hafiz, Munawar, Sayagh, Mohammed, Adams, Bram, Hindle, Abram |
Conference Name | Proceedings of the 38th International Conference on Software Engineering |
Date Published | May 2016 |
Publisher | ACM |
Conference Location | New York, NY, USA |
ISBN Number | 978-1-4503-3900-1 |
Keywords | API, APIs, applications programming interfaces, collections, compositionality, energy profile, Java, pubcrawl, Resiliency |
Abstract | 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 the memory usage and the bytecode executed during an operation. Expensive computation tasks in the analyzed bytecode traces appeared to have an 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 the wrong Collections type, as indicated by our profiles, can cost even 300% more energy than the most 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. |
URL | https://dl.acm.org/doi/10.1145/2884781.2884869 |
DOI | 10.1145/2884781.2884869 |
Citation Key | hasan_energy_2016 |