Does faster mean greener? Runtime and energy trade-offs in iOS applications with compiler optimizations

José Miguel Aragón-Jurado, Abdul Ali Bangash, Bernabé Dorronsoro, Karim Ali, Abram Hindle, Patricia Ruiz

2025/07/08

Does faster mean greener? Runtime and energy trade-offs in iOS applications with compiler optimizations

Authors

José Miguel Aragón-Jurado, Abdul Ali Bangash, Bernabé Dorronsoro, Karim Ali, Abram Hindle, Patricia Ruiz

Venue

Abstract

Smartphones outnumber people nowadays, requiring efficient energy management. High application energy use leads to faster battery drain and frequent recharging, negatively impacting both battery life and the environment. This cycle also contributes to rising electronic and chemical waste due to discarded mobile phone batteries. Compiler optimization flags may play a crucial role in mitigating these issues by optimizing software performance. However, there has been little research on examining how compiler optimization flags impact the energy consumption of smartphone applications. This work presents an empirical study on the effect of the most aggressive iOS compiler optimizations on runtime, power consumption, and energy consumption across six different iOS applications. For each application, we developed a benchmark focused on the specified category we aimed to study. Our results show that reducing application runtime does not always directly correlate with improved energy consumption. In fact, we observed that optimizations aimed at enhancing runtime performance often come at an energy cost in the applications studied, highlighting a trade-off between runtime and energy consumption. For example, we found that using -Ounchecked in Swift, combined with -Oz from LLVM in the GhostRun video game, increases energy consumption by 34%, despite improving runtime performance by 9%.

Bibtex

@article{aragon2025sustainable-greener,
 abstract = {Smartphones outnumber people nowadays, requiring efficient energy management. High application energy use leads to faster battery drain and frequent recharging, negatively impacting both battery life and the environment. This cycle also contributes to rising electronic and chemical waste due to discarded mobile phone batteries. Compiler optimization flags may play a crucial role in mitigating these issues by optimizing software performance. However, there has been little research on examining how compiler optimization flags impact the energy consumption of smartphone applications. This work presents an empirical study on the effect of the most aggressive iOS compiler optimizations on runtime, power consumption, and energy consumption across six different iOS applications. For each application, we developed a benchmark focused on the specified category we aimed to study. Our results show that reducing application runtime does not always directly correlate with improved energy consumption. In fact, we observed that optimizations aimed at enhancing runtime performance often come at an energy cost in the applications studied, highlighting a trade-off between runtime and energy consumption. For example, we found that using -Ounchecked in Swift, combined with -Oz from LLVM in the GhostRun video game, increases energy consumption by 34%, despite improving runtime performance by 9%.},
 accepted = {2025-07-08},
 author = {José Miguel Aragón-Jurado and Abdul Ali Bangash and Bernabé Dorronsoro and Karim Ali and Abram Hindle and Patricia Ruiz},
 authors = {José Miguel Aragón-Jurado, Abdul Ali Bangash, Bernabé Dorronsoro, Karim Ali, Abram Hindle, Patricia Ruiz},
 code = {aragon2025sustainable-greener},
 day = {01},
 doi = {https://doi.org/10.1016/j.suscom.2025.101166},
 funding = {NSERC Discovery},
 institution = {University of Alberta},
 journal = {Sustainable Computing: Informatics and Systems},
 month = {September},
 number = {10},
 pagerange = {1--18},
 pages = {1--18},
 payurl = {https://www.sciencedirect.com/science/article/pii/S2210537925000873?via%3Dihub},
 role = { Researcher / Co-author},
 title = {Does faster mean greener? Runtime and energy trade-offs in iOS applications with compiler optimizations},
 type = {article},
 url = {http://softwareprocess.ca/pubs/aragon2025sustainable-greener.pdf},
 venue = {Sustainable Computing: Informatics and Systems},
 volume = {47},
 year = {2025}
}