ACM Home Page
Please provide us with feedback. Feedback
Virtual machine showdown: Stack versus registers
Full text PdfPdf (2.15 MB)
Source
ACM Transactions on Architecture and Code Optimization (TACO) archive
Volume 4 ,  Issue 4  (January 2008) table of contents
Article No. 2  
Year of Publication: 2008
ISSN:1544-3566
Authors
Yunhe Shi  Trinity College Dublin, Dublin 2, Ireland
Kevin Casey  Trinity College Dublin, Dublin 2, Ireland
M. Anton Ertl  Technische Universität Wien
David Gregg  Trinity College Dublin, Dublin 2, Ireland
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 42,   Downloads (12 Months): 413,   Citation Count: 2
Additional Information:

abstract   references   cited by   index terms   review   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/1328195.1328197
What is a DOI?

ABSTRACT

Virtual machines (VMs) enable the distribution of programs in an architecture-neutral format, which can easily be interpreted or compiled. A long-running question in the design of VMs is whether a stack architecture or register architecture can be implemented more efficiently with an interpreter. We extend existing work on comparing virtual stack and virtual register architectures in three ways. First, our translation from stack to register code and optimization are much more sophisticated. The result is that we eliminate an average of more than 46% of executed VM instructions, with the bytecode size of the register machine being only 26% larger than that of the corresponding stack one. Second, we present a fully functional virtual-register implementation of the Java virtual machine (JVM), which supports Intel, AMD64, PowerPC and Alpha processors. This register VM supports inline-threaded, direct-threaded, token-threaded, and switch dispatch. Third, we present experimental results on a range of additional optimizations such as register allocation and elimination of redundant heap loads. On the AMD64 architecture the register machine using switch dispatch achieves an average speedup of 1.48 over the corresponding stack machine. Even using the more efficient inline-threaded dispatch, the register VM achieves a speedup of 1.15 over the equivalent stack-based VM.


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
 
2
Antonioli, D. N. and Pilz, M. 1998. Analysis of the Java class file format. Tech. rep.
3
4
 
5
6
 
7
Bull, M., Smith, L., Westhead, M., Henty, D., and Davey, R. 2000. Benchmarking Java Grande applications. In Second Ineternational Conference and Exhibtion on the Practical Application of Java. Manchester, UK.
8
9
10
11
12
 
13
Eller, H. 2005. Optimizing interpreters with superinstructions. M.S. thesis, Institut für Computersprachen, Technische Universität Wien. http://www.complang.tuwien.ac.at/Dimplomarbeiten/eller05.ps.gz.
14
 
15
Ertl, M. A. and Gregg, D. 2003. The structure and performance of efficient interpreters. The Journal of Instruction-Level Parallelism 5. http://www.jilp.org/vol5/.
 
16
 
17
Ertl, M. A., Thalinger, C., and Krall, A. 2006. Superinstructions and replication in the Cacao JVM interpreter. Journal of .NET Technologies 4, 25--32. Journal papers from .NET Technologies 2006 conference.
 
18
19
 
20
 
21
 
22
Ierusalimschy, R., de Figueiredo, L., and Celes, W. 2005. The implementation of Lua 5.0. Journal of Universal Computer Science 11, 7, 1159--1176. http://www.jucs.org/jucs_11_7/the_implementation_of_lua.
 
23
 
24
Klint, P. 1981. Interpretation techniques. Software---Practice and Experience 11, 963--973.
 
25
Krall, A. and Grafl, R. 1997. Cacao---a 64-bit JavaVM just-in-time compiler. Concurrency---Practice and Experience 9, 11, 1017--1030.
26
 
27
McGlashan, B. and Bower, A. 1999. The interpreter is dead (slow). Isn't it? In OOPSLA'99 Workshop: Simplicity, Performance and Portability in Virtual Machine Design.
 
28
Mössenböck, H. 2000. Adding static single assignment form and a graph coloring register allocator to the Java Hotspot client compiler. Technical Report TR-15, Johannes Kepler University Linz Institute for Practical Computer Science, Altenbergerstra 69, A-4040 Linz.
 
29
30
31
32
33
 
34
Radhakrishnan, R., Vijaykrishnan, N., John, L. K., and Sivasubramaniam, A. 2000. Architectural issues in Java runtime systems. In Proceedings of the Sixth International Symposium on High-Performance Computer Architecture (8--12 Jan.). Toulouse, France. 387--398.
35
36
 
37
 
38
SPEC. 1998. SPEC releases SPEC JVM98, first industry-standard benchmark for measuring Java virtual machine performance. Press Release. http://www.spec.org/jvm98/press.html.
 
39
Sugalski, D. 2002. Parrot in detail. In Yet Another Perl Conference (YAPC 02). Saint Louis, Missouri. http://www.parrotcode.org/talks/ParrotInDetail2.pdf.
 
40
Sun-Microsystems. 2001. The Java Hotspot virtual machine. Tech. rep., Sun Microsystems Inc.
41
 
42
Vallée-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., and Co, P. 1999. Soot---a Java optimization framework. In Proceedings of CASCON 1999. 125--135.
43
44
 
45



REVIEW

"Charles Robert Morgan : Reviewer"

Programming language interpreters represent the executing program as an abstract machine. The major representation for Java is an abstract stack machine called Java bytecodes. The alternative representation is an abstract register machine. This pa  more...

Collaborative Colleagues:
Yunhe Shi: colleagues
Kevin Casey: colleagues
M. Anton Ertl: colleagues
David Gregg: colleagues