Comparing the Energy Efficiency of WebAssembly and JavaScript in Web Applications on Android Mobile Devices
Status:: π©
Links:: Energy-efficient Programming | WebAssembly | JavaScript
Metadata
Authors:: van Hasselt, Max; Huijzendveld, Kevin; Noort, Nienke; de Ruijter, Sasja; Islam, Tanjina; Malavolta, Ivano
Title:: Comparing the Energy Efficiency of WebAssembly and JavaScript in Web Applications on Android Mobile Devices
Date:: 2022
Publisher:: Association for Computing Machinery
URL:: https://doi.org/10.1145/3530019.3530034
DOI:: 10.1145/3530019.3530034
Bibliography
van Hasselt, M., Huijzendveld, K., Noort, N., de Ruijter, S., Islam, T., & Malavolta, I. (2022). Comparing the Energy Efficiency of WebAssembly and JavaScript in Web Applications on Android Mobile Devices. Proceedings of the International Conference on Evaluation and Assessment in Software Engineering 2022, 140β149. https://doi.org/10.1145/3530019.3530034
Zotero
Type:: #zotero/conferencePaper
Keywords:: [β
, Green Software]
Relations
Abstract
Context. WebAssembly was created as an alternative to JavaScript for developing heavy loading web applications. Since JavaScript is known to have long execution times. A lot of research is already performed to compare the run-time performance of WebAssembly against that of JavaScript. However, little research is available that compares the energy consumption of WebAssembly versus JavaScript. Goal. With this study we aim to identify the correlation between the energy consumption and the use of WebAssembly versus JavaScript. This will aid developers in deciding which method matches the needs of their project best in terms of energy efficiency. Method. The subjects of the experiment are WebAssembly and JavaScript. During the experiment two research questions are defined. For the first research question the programming language is the independent variable. For the second research question the web browser is the independent variable. For both research questions is the energy consumption of the Android device in Joules the dependent variable. Results. We can confirm that the energy consumption of WebAssembly is less than that of JavaScript. The browser also plays a role since the energy consumption of Firefox is significantly smaller than that of Chrome for both WebAssembly and JavaScript. Conclusions. This study provides evidence that using WebAssembly for the development of web applications can reduce the energy consumption and thus improve the battery life of a userβs Android device. Developers can use this information when choosing a programming language to develop a web application. Moreover, using Firefox over Chrome does also reduce the energy consumption of web applications developed both with WebAssembly and JavaScript.
Notes & Annotations
π Annotations (imported on 2023-06-01#14:23:38)
Boxplot of the energy consumption of JavaScript, WebAssembly, Chrome and Firefox
The results of this experiment show that there is a significant difference in energy consumption between the use of WebAssembly and JavaScript. In addition, the choice of browser also contributed to the differences in energy consumption. Therefore to improve the energy efficiency of web applications, we recommend software developers to compile web applications to WebAssembly when possible. In the same sense, we suggest user to use the browser Firefox over Chrome, when energy is an issue. Combining these two factors will lead to the optimization of energy consumption when using web applications.