skip to main content
10.1145/2884781.2884869acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article
Public Access

Energy profiles of Java collections classes

Published:14 May 2016Publication History

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.

References

  1. S. A. Abtahizadeh, F. Khomh, and Y.-G. Guéhéneuc. How green are cloud patterns? In Proceedings of the 34th IEEE International Performance Computing and Communications Conference (IPCCC), Nanjing, China, December 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Apache commons collections. http://commons.apache.org/proper/commons-collections/source-repository.html.Google ScholarGoogle Scholar
  3. Apache commons configuration. https://commons.apache.org/proper/commons-configuration/index.html.Google ScholarGoogle Scholar
  4. Commons math: The apache commons mathematics library. https://commons.apache.org/proper/commons-math/.Google ScholarGoogle Scholar
  5. K. Aggarwal, C. Zhang, J. C. Campbell, A. Hindle, and E. Stroulia. The power of system call traces: Predicting the software energy consumption impact of changes. In Press of the 2014 Conference of the Center for Advanced Studies on Collaborative Research, IBM Corp, 2014.Google ScholarGoogle Scholar
  6. N. Amsel and B. Tomlinson. Green tracker: a tool for estimating the energy consumption of software. In CHI'10 Extended Abstracts on Human Factors in Computing Systems, pages 3337--3342. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Brooks, V. Tiwari, and M. Martonosi. Wattch: A framework for architectural-level power analysis and optimizations. In Proceedings of the 27th Annual International Symposium on Computer Architecture, ISCA '00, pages 83--94, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Bunse, H. Hopfner, E. Mansour, and S. Roychoudhury. Exploring the energy consumption of data sorting algorithms in embedded and mobile environments. In MDM'09. Tenth International Conference on, pages 600--607. IEEE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Bunse, H. Höpfner, S. Roychoudhury, and E. Mansour. Choosing the" best" sorting algorithm for optimal energy consumption. In ICSOFT (2), pages 199--206, 2009.Google ScholarGoogle Scholar
  10. C. Bunse, Z. Schwedenschanze, and S. Stiemer. On the energy consumption of design patterns. In EASED@ BUIS, pages 7--8. Citeseer, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  11. M. Dong, Y.-S. K. Choi, and L. Zhong. Power Modeling of Graphical User Interfaces on OLED Displays. In DAC 2009, DAC '09, pages 652--657, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Dong and L. Zhong. Self-constructive high-rate system energy modeling for battery-powered mobile systems. In Proceedings of the 9th MobiSys, pages 335--348. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Götz, C. Wilke, S. Richly, and U. Aßmann. Approximating quality contracts for energy auto-tuning software. In GREENS 2012, pages 8--14, June 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Götz, C. Wilke, M. Schmidt, S. Cech, and Uwe. Towards energy auto tuning, Aug. 21 2013.Google ScholarGoogle Scholar
  15. Google gson. https://code.google.com/p/google-gson/.Google ScholarGoogle Scholar
  16. J. Gui, S. Mcilroy, M. Nagappan, and W. G. J. Halfond. Truth in advertising: The hidden cost of mobile ads for software developers. In Proceedings of the 37th International Conference on Software Engineering - Volume 1, ICSE '15, pages 100--110, Piscataway, NJ, USA, 2015. IEEE Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Gupta, T. Zimmermann, C. Bird, N. Nagappan, T. Bhat, and S. Emran. Detecting Energy Patterns in Software Development. Technical Report MSR-TR-2011-106, Microsoft Research, 2011.Google ScholarGoogle Scholar
  18. S. Gurumurthi, A. Sivasubramaniam, M. J. Irwin, N. Vijaykrishnan, and M. Kandemir. Using complete machine simulation for software power estimation: The softwatt approach. In Proceedings of the HPCA8, pages 141--150. IEEE, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. Hao, D. Li, W. G. Halfond, and R. Govindan. Estimating android applications' cpu energy usage via bytecode profiling. In GREENS, 2012 First International Workshop on, pages 1--7. IEEE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Hindle. Green mining: A methodology of relating software change and configuration to power consumption. Empirical Softw. Engg., 20(2):374--409, Apr. 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Hindle, A. Wilson, K. Rasmussen, E. J. Barlow, J. C. Campbell, and S. Romansky. Greenminer: a hardware based mining software repositories software energy consumption framework. In Proc. of the 11th MSR, pages 12--21. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. N. Hunt, P. S. Sandhu, and L. Ceze. Characterizing the performance and energy efficiency of lock-free data structures. In INTERACT, pages 63--70. IEEE, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. S. Infantes, G. Beltrame, F. Khomh, E. Alba, and G. Antoniol. Optimizing user experience in choosing android applications. In Proceedings of the 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER), Osaka, Japan, March 2016.Google ScholarGoogle Scholar
  24. Java collections framework. http://docs.oracle.com/javase/8/docs/technotes/guides/collections/.Google ScholarGoogle Scholar
  25. Java parser. https://github.com/javaparser/javaparser.Google ScholarGoogle Scholar
  26. K-9 mail. http://k9mail.org/.Google ScholarGoogle Scholar
  27. D. Li, S. Hao, W. G. Halfond, and R. Govindan. Calculating source line level energy information for android applications. In Proceedings of the 2013 ISSTA, pages 78--89. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Linares-Vásquez, G. Bavota, C. Bernal-Cárdenas, R. Oliveto, M. Di Penta, and D. Poshyvanyk. Mining energy-greedy api usage patterns in android apps: an empirical study. In Proceedings of the 11th Working Conference on MSR, pages 2--11. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Litke, K. Zotos, A. Chatzigeorgiou, and G. Stephanides. Energy consumption analysis of design patterns. In Proceedings of the International Conference on Machine Learning and Software Engineering, pages 86--90. Centre for Telematics and Information Technology, University of Twente, 2005.Google ScholarGoogle Scholar
  30. I. Manotas, L. Pollock, and J. Clause. Seeds: A software engineer's energy-optimization decision support framework. In Proceedings of the 36th ICSE, pages 503--514. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. I. Manotas, C. Sahin, J. Clause, L. Pollock, and K. Winbladh. Investigating the impacts of web servers on web application energy usage. In GREENS, 2013 2nd International Workshop on, pages 16--23. IEEE, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. Mudge, T. Austin, and D. Grunwald. The reference manual for the sim-panalyzer version 2.0.Google ScholarGoogle Scholar
  33. A. Noureddine, R. Rouvoy, and L. Seinturier. Unit testing of energy consumption of software libraries. In Proceedings of the 29th Annual ACM Symposium on Applied Computing, SAC '14, pages 1200--1205, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. C. Pang, A. Hindle, B. Adams, and A. E. Hassan. What do programmers know about the energy consumption of software? PeerJ PrePrints, 3, 2015.Google ScholarGoogle Scholar
  35. J. J. Park, J. Hong, and S. Lee. Investigation for software power consumption of code refactoring techniques. In Proc. of the 26th International Conference on Software Engineering and Knowledge (SEKE), pages 717--722, 2014.Google ScholarGoogle Scholar
  36. A. Pathak, Y. C. Hu, and M. Zhang. Bootstrapping energy debugging on smartphones: a first look at energy bugs in mobile devices. In Proceedings of the 10th ACM Workshop on Hot Topics in Networks, page 5. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. P. M. Phothilimthana, J. Ansel, J. Ragan-Kelley, and S. Amarasinghe. Portable performance on heterogeneous architectures. In ASPLOS 2013, ASPLOS '13, pages 431--444, New York, NY, USA, 2013. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. G. Pinto, F. Castor, and Y. D. Liu. Mining questions about software energy consumption. In Proceedings of the 11th Working Conference on MSR, pages 22--31. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. K. Rasmussen, A. Wilson, and A. Hindle. Green mining: energy consumption of advertisement blocking methods. In H. A. Müller, P. Lago, M. Morisio, N. Meyer, and G. Scanniello, editors, GREENS 2014, pages 38--45. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. C. Sahin, F. Cayci, I. L. M. Gutierrez, J. Clause, F. Kiamilev, L. Pollock, and K. Winbladh. Initial explorations on design pattern energy usage. In GREENS, 2012, pages 55--61. IEEE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. C. Sahin, L. Pollock, and J. Clause. How do code refactorings affect energy usage? In ESEM, pages 36:1--36:10, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. C. Sahin, P. Tornquist, R. Mckenna, Z. Pearson, and J. Clause. How does code obfuscation impact energy usage? In Proceedings of the 2014 IEEE International Conference on Software Maintenance and Evolution, ICSME '14, pages 131--140, Washington, DC, USA, 2014. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. A. Sakti, G. Pesant, and Y.-G. Guéhéneuc. Instance generator and problem representation to improve object oriented code coverage. IEEE Transactions on Software Engineering, pages 1--1, To appear, 2015.Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. O. Shacham, M. Vechev, and E. Yahav. Chameleon: Adaptive selection of collections. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '09, pages 408--418, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. D. Singh and W. J. Kaiser. The atom leap platform for energy-efficient embedded computing. Center for Embedded Network Sensing, 2010.Google ScholarGoogle Scholar
  46. V. Tiwari, S. Malik, and A. Wolfe. Power analysis of embedded software: a first step towards software power minimization. Very Large Scale Integration (VLSI) Systems, IEEE Transactions on, 2(4):437--445, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Trove. http://trove.starlight-systems.com/.Google ScholarGoogle Scholar
  48. T. J. watson libraries for analysis (wala). http://wala.sourceforge.net/wiki/index.php/Main_Page.Google ScholarGoogle Scholar
  49. Watts up. https://www.wattsupmeters.com/secure/products.php?pn=0.Google ScholarGoogle Scholar
  50. C. Wilke, S. Richly, S. Gotz, C. Piechnick, and U. Aßmann. Energy consumption and efficiency in mobile applications: A user feedback study. In GreenCom 2013, (iThings/CPSCom) and CPSCom, pages 134--141. IEEE, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Xstream. http://xstream.codehaus.org/.Google ScholarGoogle Scholar
  52. W. Ye, N. Vijaykrishnan, M. Kandemir, and M. J. Irwin. The design and use of simplepower: a cycle-accurate energy estimation tool. In Proceedings of DAC, pages 340--345. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. C. Zhang, A. Hindle, and D. M. Germán. The impact of user choice on energy consumption. IEEE Software, 31(3):69--75, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  54. L. Zhang, B. Tiwana, Z. Qian, Z. Wang, R. P. Dick, Z. M. Mao, and L. Yang. Accurate Online Power Estimation and Automatic Battery Behavior Based Power Model Generation for Smartphones. In CODES/ISSS '10, pages 105--114, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Energy profiles of Java collections classes

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              ICSE '16: Proceedings of the 38th International Conference on Software Engineering
              May 2016
              1235 pages
              ISBN:9781450339001
              DOI:10.1145/2884781

              Copyright © 2016 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 14 May 2016

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate276of1,856submissions,15%

              Upcoming Conference

              ICSE 2025

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader