Benchmarking Native Code Against WebAssembly in WebAssembly System Interface Compliant Environments
Moshiri, MohammadJavad (2024)
Moshiri, MohammadJavad
2024
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2024-04-17
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202403223029
https://urn.fi/URN:NBN:fi:tuni-202403223029
Tiivistelmä
WebAssembly is increasingly recognized, with its ecosystem experiencing rapid growth due to significant investment from companies and ongoing research efforts. The introduction of the WebAssembly System Interface (WASI) potentially transforms WebAssembly runtimes and environments into standalone platforms, a development whose implications have yet to be extensively explored.
This thesis investigates the performance of WebAssembly in comparison to native code across three programming languages: C, Go, and Rust, in scenarios likely to be affected by WASI, including system calls, memory management, and input/output operations. Tests were conducted in three environments: native code on Raspberry Pi Model 4B, and the WebAssembly code on the Wasmtime and Wasmer runtimes, focusing exclusively on execution time.
Results indicate significant variability, ranging from WebAssembly outperforming native code by up to 100 times in system directory access—a result that warrants further investigation—to experiencing a slowdown of 375 times in I/O operations on the Wasmer runtime for C.
This study highlights the case-by-case nature of WebAssembly's performance and underscores the potential of WASI in diversifying the computational landscape.
This thesis investigates the performance of WebAssembly in comparison to native code across three programming languages: C, Go, and Rust, in scenarios likely to be affected by WASI, including system calls, memory management, and input/output operations. Tests were conducted in three environments: native code on Raspberry Pi Model 4B, and the WebAssembly code on the Wasmtime and Wasmer runtimes, focusing exclusively on execution time.
Results indicate significant variability, ranging from WebAssembly outperforming native code by up to 100 times in system directory access—a result that warrants further investigation—to experiencing a slowdown of 375 times in I/O operations on the Wasmer runtime for C.
This study highlights the case-by-case nature of WebAssembly's performance and underscores the potential of WASI in diversifying the computational landscape.
Kokoelmat
- Kandidaatintutkielmat [8935]