Comparing the Energy Efficiency of WebAssembly and JavaScript in Web Applications on Android Mobile Devices

Max Van Hasselt, Kevin Huijzendveld, Nienke Noort, Sasja De Ruijter, Tanjina Islam, Ivano Malavolta

Research output: Chapter in Book / Report / Conference proceedingConference contributionAcademicpeer-review

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.

Original languageEnglish
Title of host publicationEASE '22
Subtitle of host publicationProceedings of the International Conference on Evaluation and Assessment in Software Engineering 2022
PublisherAssociation for Computing Machinery
Pages140-149
Number of pages10
ISBN (Electronic)9781450396134
DOIs
Publication statusPublished - Jun 2022
Event26th ACM International Conference on Evaluation and Assessment in Software Engineering, EASE 2022 - Gothenburg, Sweden
Duration: 13 Jun 202215 Jun 2022

Publication series

NameACM International Conference Proceeding Series

Conference

Conference26th ACM International Conference on Evaluation and Assessment in Software Engineering, EASE 2022
Country/TerritorySweden
CityGothenburg
Period13/06/2215/06/22

Bibliographical note

Publisher Copyright:
© 2022 ACM.

Fingerprint

Dive into the research topics of 'Comparing the Energy Efficiency of WebAssembly and JavaScript in Web Applications on Android Mobile Devices'. Together they form a unique fingerprint.

Cite this