Short-circuit dispatch

Author:

Kim Channoh1,Kim Sungmin1,Cho Hyeon Gyu1,Kim Dooyoung1,Kim Jaehyeok1,Oh Young H.1,Jang Hakbeom1,Lee Jae W.1

Affiliation:

1. Sungkyunkwan University, Suwon, Korea

Abstract

Interpreters are widely used to implement high-level language virtual machines (VMs), especially on resource-constrained embedded platforms. Many scripting languages employ interpreter-based VMs for their advantages over native code compilers, such as portability, smaller resource footprint, and compact codes. For efficient interpretation a script (program) is first compiled into an intermediate representation, or bytecodes . The canonical interpreter then runs an infinite loop that fetches, decodes, and executes one bytecode at a time. This bytecode dispatch loop is a well-known source of inefficiency, typically featuring a large jump table with a hard-to-predict indirect jump. Most existing techniques to optimize this loop focus on reducing the misprediction rate of this indirect jump in both hardware and software. However, these techniques are much less effective on embedded processors with shallow pipelines and low IPCs. Instead, we tackle another source of inefficiency more prominent on embedded platforms--redundant computation in the dispatch loop. To this end, we propose Short-Circuit Dispatch (SCD), a low-cost architectural extension that enables fast, hardware-based bytecode dispatch with fewer instructions. The key idea of SCD is to overlay the software-created bytecode jump table on a branch target buffer (BTB). Once a bytecode is fetched, the BTB is looked up using the bytecode, instead of PC, as key. If it hits, the interpreter directly jumps to the target address retrieved from the BTB; otherwise, it goes through the original dispatch path. This effectively eliminates redundant computation in the dispatcher code for decode, bound check, and target address calculation, thus significantly reducing total instruction count. Our simulation results demonstrate that SCD achieves geomean speedups of 19.9% and 14.1% for two production-grade script interpreters for Lua and JavaScript, respectively. Moreover, our fully synthesizable RTL design based on a RISC-V embedded processor shows that SCD improves the EDP of the Lua interpreter by 24.2%, while increasing the chip area by only 0.72% at a 40nm technology node.

Publisher

Association for Computing Machinery (ACM)

Reference38 articles.

1. "Node.js - open-source runtime environment for developing server-side web applications." https://nodejs.org "Node.js - open-source runtime environment for developing server-side web applications." https://nodejs.org

2. "WebOS - linux kernel-based multitask operating system for smart devices." http://www.openwebosproject.org "WebOS - linux kernel-based multitask operating system for smart devices." http://www.openwebosproject.org

3. "TIZEN." https://www.tizen.org "TIZEN." https://www.tizen.org

4. "Python." https://www.python.org "Python." https://www.python.org

5. "Ruby." https://www.ruby-lang.org "Ruby." https://www.ruby-lang.org

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Typed Architectures;ACM SIGPLAN Notices;2017-05-12

2. Typed Architectures;ACM SIGARCH Computer Architecture News;2017-05-11

3. Typed Architectures;Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems;2017-04-04

4. Typed Architectures;ACM SIGOPS Operating Systems Review;2017-04-04

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3