Web browsers are essential in the digital era, enabling seamless access to information and content. However, their intensive resource usage raises energy efficiency concerns, especially in battery-powered devices. Excessive consumption accelerates battery depletion, shortens device lifespan, and contributes to electronic waste and environmental degradation. This study aims to empirically assess the impact of compiler optimization flags on the energy efficiency of modern web browsers, focusing on both Rust- and LLVM-based configurations. Three widely used browsers, namely Firefox, LibreWolf, and Chromium, were evaluated under two benchmark conditions: one browser-specific and one common across all browsers. For each configuration, runtime, energy consumption, and memory usage were measured to quantify performance gains resulting from different optimization strategies. The experiments show that compiler optimizations substantially improve runtime, energy efficiency, and memory utilization, with maximum gains of 76.39%, 76.37%, and 76.22%, respectively. Firefox achieved the best overall performance in energy and runtime metrics, while Chromium showed superior memory efficiency. Rust-specific optimizations alone produced inconsistent outcomes, but combining them with LLVM optimizations yielded more reliable improvements. Compiler optimizations significantly enhance browser performance and energy efficiency. Achieving consistent gains, however, requires carefully combining optimization levels to balance performance and energy use.
Aragón-Jurado et al. (Tue,) studied this question.