Context. WebAssembly (WASM) is a low-level bytecode format that is gaining traction among Internet of Things (IoT) devices. Because of IoT devices’ resources limitations, Using WASM is becoming a popular technique for virtualization on IoT devices. However, it is unclear if the promises of WASM regarding its efficient use of energy and performance gains hold true.

Goal. This study aims to determine how different source programming languages and runtime environments affect the energy consumption and performance of WASM binaries.

Method. We perform a controlled experiment where we compile three benchmarking algorithms from four different programming languages (i.e., C, Rust, Go, and JavaScript) to WASM and run them using two different WASM runtimes on a Raspberry Pi 3B.

Results. The source programming language significantly influences the performance and energy consumption of WASM binaries. Differently, we did not find evidence of the impact of the runtime environment. However, certain combinations of source programming language and runtime environment leads to a significant improvement of its energy consumption and performance.

Conclusions. IoT developers should choose the source programming language wisely to benefit from increased performance and a significant reduction in energy consumption. Specifically, JavaScript should be generally avoided, while C and Rust are better options.

Fri 16 Jun

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

14:00 - 15:00
Games, creative coding, and performancePLNL 2023 at Doelenzaal (C0.07)
14:00
20m
Talk
Putting the PL in GamePLay: Analyzing the Expressive Power of a Game DSL
PLNL 2023
File Attached
14:20
20m
Talk
Towards Version Control for Creative Coding
PLNL 2023
Maximilian Mayer Vrije Universiteit (VU) Amsterdam, Mauricio Verano Merino Vrije Universiteit Amsterdam
File Attached
14:40
20m
Talk
On the Energy Consumption and Performance of WebAssembly Binaries across Programming Languages and Runtimes in IoT
PLNL 2023
Linus Wagner Vrije Universiteit Amsterdam, Maximilian Mayer Vrije Universiteit (VU) Amsterdam, Andrea Marino Vrije Universiteit (VU) Amsterdam, Alireza Soldani Nezhad , Hugo Zwaan , Ivano Malavolta Vrije Universiteit Amsterdam
DOI Pre-print