Authors:
Dennis Pockstaller
1
;
Stefan Huber
2
and
Lukas Demetz
1
Affiliations:
1
University of Applied Sciences Kufstein, 6330 Kufstein, Austria
;
2
University of Innsbruck, 6020 Innsbruck, Austria
Keyword(s):
WebAssembly, Energy-Efficiency, Mobile Web Engineering.
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 F
irefox, 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.
(More)