Ugawa, Tomoharu, Marr, Stefan, Jones, Richard (2022) Profile Guided Offline Optimization of Hidden Class Graphs for JavaScript VMs in Embedded Systems. In: ACM. VMIL '22: Virtual Machines and Language Implementations. VMIL . pp. 25-35. ACM (doi:10.1145/3563838.3567678) (KAR id:97523)
PDF
Author's Accepted Manuscript
Language: English DOI for this version: 10.22024/UniKent/01.02.97523.3281161 |
|
Download this file (PDF/643kB) |
Preview |
Request a format suitable for use with assistive technology e.g. a screenreader | |
Official URL: https://dl.acm.org/doi/10.1145/3563838.3567678 |
Abstract
JavaScript is increasingly used for the Internet of Things (IoT) on embedded systems. However, JavaScript's memory footprint is a challenge, because normal JavaScript virtual machines (VMs) do not fit into the small memory of IoT devices. In part this is because a significant amount of memory is used by hidden classes, which are used to represent JavaScript's dynamic objects efficiently.
In this research, we optimize the hidden class graph to minimize their memory use. Our solution collects the hidden class graph and related information for an application in a profiling run, and optimizes the graph offline. We reduce the number of hidden classes by avoiding introducing intermediate ones, for instance when properties are added one after another. Our optimizations allow the VM to assign the most likely final hidden class to an object at its creation. They also minimize re-allocation of storage for property values, and reduce the polymorphism of inline caches.
We implemented these optimizations in a JavaScript VM, eJSVM, and found that offline optimization can eliminate 61.9% of the hidden classes on average. It also improves execution speed by minimizing the number of hidden class transitions for an object and reducing inline cache misses.
Item Type: | Conference or workshop item (Paper) |
---|---|
DOI/Identification number: | 10.1145/3563838.3567678 |
Uncontrolled keywords: | JavaScript, virtual machine, embedded systems, hidden class, inline caching, profiling, offline optimization, IoT |
Subjects: | Q Science > QA Mathematics (inc Computing science) |
Divisions: | Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing |
Funders: |
Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Royal Society (https://ror.org/03wnrjx87) |
Depositing User: | Stefan Marr |
Date Deposited: | 27 Oct 2022 00:01 UTC |
Last Modified: | 05 Nov 2024 13:02 UTC |
Resource URI: | https://kar.kent.ac.uk/id/eprint/97523 (The current URI for this page, for reference purposes) |
- Link to SensusAccess
- Export to:
- RefWorks
- EPrints3 XML
- BibTeX
- CSV
- Depositors only (login required):