Towards reducing the need for algorithmic primitives in dynamic language VMs through a tracing JIT
Authors:
Open Access
- 4 July 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-10
Abstract
When implementing virtual machines, besides the interpreter and optimization facilities, we have to include a set of primitive functions that the client language can use. Some of these implement truly primitive behavior, such as arithmetic operations. Other primitive functions, which we call algorithmic primitives, are expressible in the client language, but are implemented in the vm to improve performance. However, having many primitives in the vm makes it harder to maintain them, or re-use them in alternative vm implementations for the same language. With the advent of efficient tracing just-in-time compilers we believe the need for algorithmic primitives to be much diminished, allowing more of them to be implemented in the client language. In this work, we investigate the trade-offs when creating primitives, and in particular how large a difference remains between primitive and client function run times in vms with tracing just-in-time compiler. To that end, we extended the RSqueak/VM, a vm for Squeak/Smalltalk written in RPython. We compare primitive implementations in C, RPython, and Smalltalk, showing that due to the tracing JIT the performance gap can be significantly reduced.Keywords
This publication has 13 references indexed in Scilit:
- The impact of meta-tracing on VM design and implementationScience of Computer Programming, 2015
- Storage strategies for collections in dynamically typed languages2013
- Storage strategies for collections in dynamically typed languagesACM SIGPLAN Notices, 2013
- MaxineACM Transactions on Architecture and Code Optimization, 2013
- Trace-based just-in-time type specialization for dynamic languagesACM SIGPLAN Notices, 2009
- Back to the Future in One Week — Implementing a Smalltalk VM in PyPy2008
- DynamoACM SIGPLAN Notices, 2000
- Back to the futureACM SIGPLAN Notices, 1997
- An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypesACM SIGPLAN Notices, 1989
- A language for bitmap manipulationACM Transactions on Graphics, 1982