ACM Home Page
Please provide us with feedback. Feedback
Catenation and specialization for Tcl virtual machine performance
Full text PdfPdf (189 KB)
Source Interpreters, Virtual Machines And Emulators archive
Proceedings of the 2004 workshop on Interpreters, virtual machines and emulators table of contents
Washington, D.C.
SESSION: Research papers III table of contents
Pages: 42 - 50  
Year of Publication: 2004
ISBN:1-58113-909-8
Authors
Benjamin Vitale  University of Toronto, Toronto, Canada
Tarek S. Abdelrahman  University of Toronto, Toronto, Canada
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): n/a,   Downloads (12 Months): n/a,   Citation Count: 4
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1059579.1059591
What is a DOI?

ABSTRACT

We present techniques for eliminating dispatch overhead in a virtual machine interpreter using a lightweight just-in-time native-code compilation. In the context of the Tcl VM, we convert bytecodes to native Sparc code, by concatenating the native instructions used by the VM to implement each bytecode instruction. We thus eliminate the dispatch loop. Furthermore, immediate arguments of bytecode instructions are substituted into the native code using runtime specialization. Native code output from the C compiler is not amenable to relocation by copying; fix-up of the code is required for correct execution. The dynamic instruction count improvement from eliding dispatch depends on the length in native instructions of each bytecode opcode implementation. These are relatively long in Tcl, but dispatch is still a significant overhead. However, their length also causes our technique to overflow the instruction cache. Furthermore, our native compilation consumes runtime. Some benchmarks run up to three times faster, but roughly half slow down, or exhibit little change.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
J. Aycock. Converting Python Virtual Machine Code to C. In Proc. of 7th Intl. Python Conf., 1998.
2
3
 
4
F. Bellard. Qemu x86 cpu emulator {online}. 2004. Available from: http://fabrice.bellard.free.fr/qemu/.
 
5
D. Cuthbert. The Kanga Tcl to C converter {online}. 2000. Available from: http://sourceforge.net/projects/kt2c/.
6
 
7
M. A. Ertl. Threaded code {online}. 1998. Available from: http://www.complang.tuwien.ac.at/forth/threaded-code.html/.
8
 
9
M. A. Ertl and D. Gregg. The Structure and Performance of Efficient Interpreters. Journal of Instruction-Level Parallelism, 5:1--25, 2003.
 
10
 
11
B. Lewis. An on-the-fly bytecode compiler for Tcl. In Proc. of the 4th Annual Tcl/Tk Workshop, 1996.
 
12
P. S. Magnusson and F. L. et al. SimICS/sun4m: A Virtual Workstation. In Proc. of the Usenix Annual Technical Conference, 1998.
13
 
14
15
 
16
F. Rouse and W. Christopher. A Typing System for an Optimizing Multiple-Backend Tcl Compiler. In Proc. of the 5th Annual Tcl/Tk Workshop, 1997.
 
17
M. Sofer. Tcl Engines {online}. Available from: http://sourceforge.net/projects/tclengine/.
 
18
19
 
20
Sun Microelectronics. UltraSPARC IIi User's Manual. 1997.
 
21
Tcl Core Team. TclLib benchmarks {online}. 2003. Available from: http://www.tcl.tk/software/tcllib/.
 
22
B. Vitale. Catenation and Operand Specialization for Tcl Virtual Machine Performance. Master's thesis, University of Toronto, 2004.


Collaborative Colleagues:
Benjamin Vitale: colleagues
Tarek S. Abdelrahman: colleagues