@gron

Branch Prediction and the Performance of Interpreters: Don't Trust Folklore

, , and . Proceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization, page 103--114. Washington, DC, USA, IEEE Computer Society, (2015)

Abstract

Interpreters have been used in many contexts. They provide portability and ease of development at the expense of performance. The literature of the past decade covers analysis of why interpreters are slow, and many software techniques to improve them. A large proportion of these works focuses on the dispatch loop, and in particular on the implementation of the switch statement: typically an indirect branch instruction. Folklore attributes a significant penalty to this branch, due to its high misprediction rate. We revisit this assumption, considering state-of-the-art branch predictors and the three most recent Intel processor generations on current interpreters. Using both hardware counters on Haswell, the latest Intel processor generation, and simulation of the ITTAGE, we show that the accuracy of indirect branch prediction is no longer critical for interpreters. We further compare the characteristics of these interpreters and analyze why the indirect branch is less important than before.

Description

Branch prediction and the performance of interpreters

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted