Compiling Haskell for Energy Efficiency: Empirical Analysis of Individual Transformations

Maja Hanne Kirkeby, Bernardo Santos, João Paulo Fernandes, Alberto Pardo

Publikation: Bidrag til bog/antologi/rapportKonferencebidrag i proceedingsForskningpeer review

Abstract

Energy efficiency is a growing concern for software developers. This empirical study investigates the impact of compiler optimizations on energy efficiency in Haskell programs compiled using the Glasgow Haskell Compiler (GHC). We focus on GHC's -O2 optimization series and explore the effects of selectively disabling individual optimizations using -fno-∗flags, alongside variations in initial execution temperatures.We examined 25 GHC optimizations across 18 benchmarks from the NoFib Haskell Benchmark Suite resulting in 468 combinations of benchmark and optimization-deactivations. Data was collected at three starting temperatures (45°C, 55°C, and 65°C), resulting in 40 samples per benchmark-optimization combination. Our key metrics included energy consumption and execution time.Considering all combinations, for 24% of the individual optimizations provided, when disabled, a significant increase in energy consumption, i.e., enabling these optimizations resulted in more energy-efficient executables, whereas for 26% the optimization provided a significant increase in time, when disabled. However, only for 12% of all the combinations, the disabling increased both time and energy consumption significantly, and in 5% of all the combinations, we observed opposite impacts on time and energy.We found that 10 optimizations produced equally or more energy-efficient executables for all the benchmarks, whereas only one compiler optimization produced a better or equally performing executable for all the benchmarks.As a secondary finding, we explored the influence of initial temperatures on energy consumption. While programs that started at 45°C showed the least variance in terms of both energy consumption and wall time, those started at 55°C tended to exhibit lower energy consumption for the typical program compared to those started at 45°C or 65°C.
OriginalsprogEngelsk
Titel39th Annual ACM Symposium on Applied Computing, SAC 2024
Antal sider10
ForlagAssociation for Computing Machinery
Publikationsdato8 apr. 2024
Sider1104-1113
ISBN (Elektronisk)9798400702433
DOI
StatusUdgivet - 8 apr. 2024
Begivenhed39th Annual ACM Symposium on Applied Computing, SAC 2024 - Avila, Spanien
Varighed: 8 apr. 202412 apr. 2024

Konference

Konference39th Annual ACM Symposium on Applied Computing, SAC 2024
Land/OmrådeSpanien
ByAvila
Periode08/04/202412/04/2024
SponsorACM Special Interested Group on Applied Computing (SIGAPP)
NavnProceedings of the ACM Symposium on Applied Computing

Emneord

  • compiler optimizations
  • energy consumption
  • functional programming
  • program transformations
  • programming languages

Citer dette