Code size and performance optimization for mobile JavaScript just-in-time compiler

  • Authors:
  • Seong-Won Lee;Soo-Mook Moon;Won-Ki Jung;Jin-Seok Oh;Hyeong-Seok Oh

  • Affiliations:
  • Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea

  • Venue:
  • Proceedings of the 2010 Workshop on Interaction between Compilers and Computer Architecture
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Full web browsing with smart phones requires a high-performance JavaScript engine since JavaScript execution with a mobile CPU is slow. So, mobile JavaScript engines employ a just-in-time compiler (JITC), which translates JavaScript code to machine code at runtime. One issue is that since mobile phones suffer from tight memory constraints, the JITC needs to keep a low memory footprint by generating small-sized machine code. In fact, many mobile CPUs support half-sized encoding for small code size with small performance degradation, as in the ARM Thumb2. This paper describes our code generation and optimization for a mobile JavaScript JITC in the Webkit's SquirrelFish Extreme (SFX) for the ARM Thumb2. We try to generate as many 16-bit instructions as possible and reduce the data area, while strictly following the code generation guidelines of the SFX, which actually leaves little room for code optimization. Our experimental results show that we could reduce the code size by 29% with a performance degradation of 3.5%, compared to the ARM version of the SFX.