that Wasm consumes around 61% less energy with
Chrome and 73% less energy with Firefox than JS in
the mean value. These values are significantly larger
than those found in this paper. A possible explana-
tion for the diverging results could be that our study
is based on a hardware-based measurement approach
and that we selected different workloads. Thus, we
consider the results of our study an important com-
plement to the existing body of research in this field.
For future work, it would be interesting to combine
the experimental subjects and measurement methods
in a single large experiment.
In other studies (Sandhu et al., 2018; Herrera
et al., 2018), a larger difference between JS and
Wasm implementations was found for Firefox than
for Chrome. This could be confirmed in this study
by RQ2 and is probably related to the lower base per-
formance of JS in Firefox. Apart from the influence of
the chosen browser, a study by Oliveira et al. (Oliveira
and Mattos, 2020) using the Node.js environment,
which comes closest to a comparison with Chrome
due to the same V8 JS engine, showed an average im-
provement of about 40% in the runtime and the energy
consumption using Wasm. In comparison, this study
was able to determine a lower energy consumption of
around 20% through the use of Wasm compared to JS
using Chrome.
The findings of our study indicate that using
Wasm in web application development brings a no-
table advantage in energy-efficiency across all tested
browsers and devices. This outcome is particularly
valuable in highly competitive markets, where such
advantages could make a crucial difference in user
satisfaction. These results would also indicate that it
is beneficiary to transfer existing code bases in C to
the web-browser via Web Assembly instead of a re-
implementation in JS.
As a practical recommendation for mobile users,
the results of this study suggest considering using
Chrome over Firefox to conserve battery life. The
results show significant results for our experiments,
however, only with a small or negligible effect size.
This small difference would result in an overall
smaller CO2 footprint for users.
6 CONCLUSIONS
The goal of this study was to determine whether
Wasm can be used to reduce the energy consump-
tion of executing intensive workloads within mobile
web applications. In an experiment with different An-
droid devices and different browsers, a variety of al-
gorithms to generate load were compared as imple-
mentations in Wasm and JS. In addition, the influence
of the chosen browser on the energy consumption on
mobile Android devices was investigated.
Overall, the results show that using Wasm instead
of JS for intensive processing tasks can reduce en-
ergy consumption by a range of approximately 20%
to 30% in the browser on Android smartphones. Fur-
thermore, it was found that Chrome consumes less en-
ergy when executing both JS and Wasm compared to
Firefox.
It is important to note that our study is limited
to Android devices and Wasm bytecode generated
by compiling C source code with emscripten. Fur-
ther research could explore the differences in energy
consumption across different device types, such as
iOS smartphones, and other programming languages
and their compilers, such as Rust, Go, or Assem-
blyScript. The study design is flexible enough and
can be adapted to enable further research in these ar-
eas.
REFERENCES
De Macedo, J., Abreu, R., Pereira, R., and Saraiva, J.
(2021). On the runtime and energy performance of
webassembly: Is webassembly superior to javascript
yet? In 2021 36th IEEE/ACM International Confer-
ence on Automated Software Engineering Workshops
(ASEW), pages 255–262.
De Macedo, J., Abreu, R., Pereira, R., and Saraiva, J.
(2022). Webassembly versus javascript: Energy and
runtime performance. In 2022 International Confer-
ence on ICT for Sustainability (ICT4S), pages 24–34.
Haas, A., Rossberg, A., Schuff, D. L., Titzer, B. L., Hol-
man, M., Gohman, D., Wagner, L., Zakai, A., and
Bastien, J. (2017). Bringing the web up to speed with
webassembly. SIGPLAN Not., 52(6):185–200.
Herrera, D., Chen, H., Lavoie, E., and Hendren, L. (2018).
Webassembly and javascript challenge: Numerical
program performance using modern browser tech-
nologies and devices. University of McGill, Montreal:
QC, Technical report SABLE-TR-2018-2.
Jangda, A., Powers, B., Guha, A., and Berger, E. (2019).
Not so fast: Analyzing the performance of webassem-
bly vs. native code. login Usenix Mag., 44.
Mozilla Developer Network (2022). Webassembly concepts
— mdn.
Oliveira, F. and Mattos, J. (2020). Analysis of We-
bAssembly as a strategy to improve JavaScript per-
formance on IoT environments. In Anais Estendidos
do X Simp
´
osio Brasileiro de Engenharia de Sistemas
Computacionais (SBESC Estendido 2020). Sociedade
Brasileira de Computac¸
˜
ao - SBC.
Sandhu, P., Herrera, D., and Hendren, L. (2018). Sparse ma-
trices on the web: Characterizing the performance and
optimal format selection of sparse matrix-vector mul-
WEBIST 2023 - 19th International Conference on Web Information Systems and Technologies
126