Haskell in green Land: Analyzing the energy behavior of a purely functional language

Luís Gabriel Lima, Francisco Soares-Neto, Paulo Lieuthier, Fernando Castor, Gilberto Melfe, João Paulo Fernandes

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Recent work has studied the effect that factors such as code obfuscation, refactorings and data types have on energy efficiency. In this paper, we attempt to shed light on the energy behavior of programs written in a lazy purely functional language, Haskell. We have conducted two empirical studies to analyze the energy efficiency of Haskell programs from two different perspectives: strictness and concurrency. Our experimental space exploration comprises more than 2000 configurations and 20000 executions. We found out that small changes can make a big difference in terms of energy consumption. For example, in one of our benchmarks, under a specific configuration, choosing one data sharing primitive (MVar) over another (TMVar) can yield 60% energy savings. In another benchmark, the latter primitive can yield up to 30% energy savings over the former. Thus, tools that support developers in quickly refactoring a program to switch between different primitives can be of great help if energy is a concern. In addition, the relationship between energy consumption and performance is not always clear. In sequential benchmarks, high performance is an accurate proxy for low energy consumption. However, for one of our concurrent benchmarks, the variants with the best performance also exhibited the worst energy consumption. To support developers in better understanding this complex relationship, we have extended two existing performance analysis tools to also collect and present data about energy consumption.

Original languageEnglish (US)
Title of host publication2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages517-528
Number of pages12
ISBN (Electronic)9781509018550
DOIs
StatePublished - May 20 2016
Event23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016 - Suita, Osaka, Japan
Duration: Mar 14 2016Mar 18 2016

Publication series

Name2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
Volume1

Conference

Conference23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
Country/TerritoryJapan
CitySuita, Osaka
Period3/14/163/18/16

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Haskell in green Land: Analyzing the energy behavior of a purely functional language'. Together they form a unique fingerprint.

Cite this