Article,

How to Select Superinstructions for Ruby

, , and .
IPSJ Online Transactions, (2010)
DOI: 10.2197/ipsjtrans.3.54

Abstract

Superinstruction is well-known techniques of improving performance of interpreters. Superinstructions eliminate jumps between VM operations (interpreter dispatch) and enable more optimizations in merged code. In past, processors with simple BTB-based branch predictors had high misprediction rate when executing interpreted code, resulting in high overhead of interpreter dispatch, so superinstructions were used to reduce it. However, this assumption is incorrect for Ruby on current hardware. Accordingly, using superinstructions for eliminating jump instructions only marginally improves performance. In this paper, we consider applying superinstructions differently to improve performance of floating point computation. We note that high percentage of objects allocated during numeric computation are boxed floating point values, meanwhile garbage collection takes significant part of the execution time. Using superinstructions composed from pairs of arithmetic operations we were able to reduce allocation of boxed floats by up to 36%, and obtain improvement in performance of up to 22%.

Tags

Users

  • @gron

Comments and Reviews