Comparing the Energy Consumption of WebAssembly and JavaScript in Mobile Browsers
Dennis Pockstaller, Stefan Huber, Lukas Demetz
2023
Abstract
With WebAssembly, a new web technology has been developed that allows compiled bytecode to be executed directly in the browser, which, unlike JavaScript code, does not have to be initially compiled by the browser and can therefore be executed faster. This allows the development of complex web applications. A challenge for these complex web applications is the increasing importance of mobile devices and their limited battery capacity. The goal of this study is to determine whether the energy consumption of web applications can be reduced by using WebAssembly instead of JavaScript. For this purpose, an automated experiment was performed on Android smartphones with different algorithms using WebAssembly and JavaScript using common browsers. The energy consumption was measured hardware-based with the Monsoon HVPM measuring device. The results show that WebAssembly consumes about 20% to 30% less energy than JavaScript. In addition, differences between the two tested browsers, Chrome and Firefox, in the energy consumption of JavaScript and WebAssembly were found. This potential reduction of energy consumption also allows to reduce the user’s CO2 footprint. The flexible study design used, allows for further investigations with other types of devices and other compilers.
DownloadPaper Citation
in Harvard Style
Pockstaller D., Huber S. and Demetz L. (2023). Comparing the Energy Consumption of WebAssembly and JavaScript in Mobile Browsers. In Proceedings of the 19th International Conference on Web Information Systems and Technologies - Volume 1: WEBIST; ISBN 978-989-758-672-9, SciTePress, pages 121-127. DOI: 10.5220/0012205600003584
in Bibtex Style
@conference{webist23,
author={Dennis Pockstaller and Stefan Huber and Lukas Demetz},
title={Comparing the Energy Consumption of WebAssembly and JavaScript in Mobile Browsers},
booktitle={Proceedings of the 19th International Conference on Web Information Systems and Technologies - Volume 1: WEBIST},
year={2023},
pages={121-127},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0012205600003584},
isbn={978-989-758-672-9},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 19th International Conference on Web Information Systems and Technologies - Volume 1: WEBIST
TI - Comparing the Energy Consumption of WebAssembly and JavaScript in Mobile Browsers
SN - 978-989-758-672-9
AU - Pockstaller D.
AU - Huber S.
AU - Demetz L.
PY - 2023
SP - 121
EP - 127
DO - 10.5220/0012205600003584
PB - SciTePress