• Media type: E-Article
  • Title: Improved Ahead-of-time Compilation of Stack-based JVM Bytecode on Resource-constrained Devices
  • Contributor: Reijers, Niels; Shih, Chi-Sheng
  • imprint: Association for Computing Machinery (ACM), 2019
  • Published in: ACM Transactions on Sensor Networks
  • Language: English
  • DOI: 10.1145/3341170
  • ISSN: 1550-4859; 1550-4867
  • Keywords: Computer Networks and Communications
  • Origination:
  • Footnote:
  • Description: <jats:p>Many virtual machines exist for sensor nodes with only a few kB  RAM and tens- to a few hundred kB Flash memory. They pack an impressive set of features but suffer from a slowdown of one to two orders of magnitude compared to optimised native code, reducing throughput and increasing power consumption.</jats:p> <jats:p>Compiling bytecode to native code to improve performance has been studied extensively for larger devices, but the restricted resources on sensor nodes mean most modern techniques cannot be applied. Simply replacing bytecode instructions with predefined sequences of native instructions is known to improve performance but produces code several times larger than the optimised C equivalent, limiting the size of programmes that can fit onto a device.</jats:p> <jats:p>This article identifies the major sources of overhead resulting from this basic approach and presents optimisations to remove most of the remaining performance overhead, and over half the size overhead, reducing them to 67% and 77%, respectively. While this increases the size of the VM, the break-even point at which this fixed cost is compensated for by the smaller code it generates, is well within the range of memory available on a sensor device, allowing us to both improve performance and load more code on a device.</jats:p>