ERICO: Effective Removal of Inline Caching Overhead in Dynamic Typed Languages
Gem Dot, Alejandro Martinez, Antonio M. González · 2016
Dynamically typed programming languages have become very popular in recent years. These languages ease the task of programmers but introduce significant runtime overheads since variables are neither declared nor bound to a particular type. In particular, every time an object property is accessed, we have to obtain the type of the object to which it belongs just before the access, in order to properly compute the address of the property. This adds an important overhead to each of these accesses. In this paper, we present ERICO, a hybrid HW/SW mechanism that removes most of this overhead. This technique is based on a runtime-built structure that provides the information required to identify the addresses of object properties in a very efficient manner. Besides, a hardware cache of this structure stores its most frequently used elements to speedup its access. To demonstrate the effectiveness of this new mechanism, we implement it in a JavaScript engine and show that on average it produces 11% speedup (up to 31% for some applications) and 10.6% energy reduction.