Thanks to visit codestin.com
Credit goes to link.springer.com

Skip to main content

Accelerating WebAssembly Interpreters in Embedded Systems Through Hardware-Assisted Dispatching

  • Conference paper
  • First Online:
Architecture of Computing Systems (ARCS 2024)

Abstract

WebAssembly is a promising bytecode virtualization technology for embedded systems. WebAssembly interpreters for embedded demonstrate strong isolation and portability. However, they come with a significant performance penalty compared to direct bare-metal execution or compiled WebAssembly code. This creates demand for interpreter optimization. In this work, we present an approach that increases the execution speed of interpreted WASM code by offloading computed GOTOs, as used in interpreters, to a hardware accelerator. We describe the accelerator’s hardware design, as well as the integration in the popular WebAssembly Micro Runtime (WAMR). To prove the functionality and effectiveness of our approach, we integrate the accelerator into an open-source RISC-V processor core and evaluate WASM interpretation using different benchmarks. Our results show that the approach significantly increases execution speed while only creating minimal code size overhead. Finally, we give an outlook on possible future improvements of the accelerator.

This project received funding from the Chips Joint Undertaking project ISOLDE (No. 101112274) and BMBF project 16MEE0372.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+
from £29.99 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Chapter
GBP 19.95
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
GBP 95.50
Price includes VAT (United Kingdom)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
GBP 119.99
Price includes VAT (United Kingdom)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition. https://developer.arm.com/documentation/ddi0406/b/Application-Level-Architecture/Application-Level-Programmers--Model/Execution-environment-support/Jazelle-direct-bytecode-execution-support?lang=en

  2. asm.js. https://asmjs.org

  3. Bristol/Embecosm Embedded Benchmark Suite. https://beebs.mageec.org

  4. Bytecode Alliance. https://bytecodealliance.org/

  5. n-body description (Benchmarks Game). https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html

  6. OpenHW Group CV32E40X User Manual. https://docs.openhwgroup.org/projects/cv32e40x-user-manual/en/latest/index.html

  7. RISC-V J Extension. https://github.com/riscv/riscv-j-extension

  8. Thumb Execution Environment (ThumbEE). https://developer.arm.com/documentation/den0013/d/ARM-Architecture-and-Processors/Architecture-history-and-extensions/Thumb-Execution-Environment--ThumbEE-

  9. W3C WebAssembly Working Group. www.w3.org/wasm/

  10. wasm3. https://github.com/wasm3/wasm3

  11. WebAssembly Micro Runtime. https://github.com/bytecodealliance/wasm-micro-runtime

  12. Fumero, J., Stratikopoulos, A., Kotselidis, C.: Running parallel bytecode interpreters on heterogeneous hardware. In: Conference Companion of the 4th International Conference on Art, Science, and Engineering of Programming, Porto, Portugal, pp. 31–35. ACM (2020). https://doi.org/10.1145/3397537.3397563

  13. Haas, A., et al.: Bringing the web up to speed with WebAssembly. In: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 185–200 (2017)

    Google Scholar 

  14. Hoult, B.: Program to count primes. http://hoult.org/primes.txt

  15. Jangda, A., Powers, B., Berger, E.D., Guha, A.: Not so fast: analyzing the performance of WebAssembly vs. native code. In: 2019 USENIX Annual Technical Conference (USENIX ATC 2019), Renton, WA, pp. 107–120. USENIX Association (2019). https://www.usenix.org/conference/atc19/presentation/jangda

  16. Lindholm, T., Yellin, F., Bracha, G., Buckley, A.: The Java Virtual Machine Specification. Addison-Wesley (2013)

    Google Scholar 

  17. O’Connor, J., Tremblay, M.: picoJava-I: the Java virtual machine in hardware. IEEE Micro 17(2), 45–53 (1997). https://doi.org/10.1109/40.592314. http://ieeexplore.ieee.org/document/592314/

  18. Rohou, E., Williams, K., Yuste, D.: Vectorization technology to improve interpreter performance. ACM Trans. Archit. Code Optim. 9(4), 1–22 (2013). https://doi.org/10.1145/2400682.2400685

  19. Wallentowitz, S., Kersting, B., Dumitriu, D.M.: Potential of WebAssembly for embedded systems. In: 2022 11th Mediterranean Conference on Embedded Computing (MECO), pp. 1–4 (2022). https://doi.org/10.1109/MECO55406.2022.9797106

  20. Wang, W.: How far we’ve come - a characterization study of standalone WebAssembly runtimes. In: 2022 IEEE International Symposium on Workload Characterization (IISWC), Austin, TX, USA, pp. 228–241. IEEE (2022). https://doi.org/10.1109/IISWC55918.2022.00028. https://ieeexplore.ieee.org/document/9975423/

  21. Wen, E., Weber, G.: Wasmachine: bring IoT up to speed with a WebAssembly OS. In: 2020 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops), Austin, TX, USA, pp. 1–4. IEEE (2020). https://doi.org/10.1109/PerComWorkshops48775.2020.9156135. https://ieeexplore.ieee.org/document/9156135/

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stefan Wallentowitz .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Rupp, M., Schröter, J., Wallentowitz, S. (2024). Accelerating WebAssembly Interpreters in Embedded Systems Through Hardware-Assisted Dispatching. In: Fey, D., Stabernack, B., Lankes, S., Pacher, M., Pionteck, T. (eds) Architecture of Computing Systems. ARCS 2024. Lecture Notes in Computer Science, vol 14842. Springer, Cham. https://doi.org/10.1007/978-3-031-66146-4_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-66146-4_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-66145-7

  • Online ISBN: 978-3-031-66146-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Keywords

Publish with us

Policies and ethics