|
ABSTRACT
Interpreters designed for efficiency execute a huge number of indirect branches and can spend more than half of the execution time in indirect branch mispredictions. Branch target buffers (BTBs) are the most widely available form of indirect branch prediction; however, their prediction accuracy for existing interpreters is only 2%--50%. In this article we investigate two methods for improving the prediction accuracy of BTBs for interpreters: replicating virtual machine (VM) instructions and combining sequences of VM instructions into superinstructions. We investigate static (interpreter build-time) and dynamic (interpreter runtime) variants of these techniques and compare them and several combinations of these techniques. To show their generality, we have implemented these optimizations in VMs for both Java and Forth. These techniques can eliminate nearly all of the dispatch branch mispredictions, and have other benefits, resulting in speedups by a factor of up to 4.55 over efficient threaded-code interpreters, and speedups by a factor of up to 1.34 over techniques relying on dynamic superinstructions alone.
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
|
|
| |
3
|
|
 |
4
|
|
| |
5
|
Casey, K., Ertl, A., and Gregg, D. 2005. Optimizations for a Java interpreter using instruction set enhancement. Tech. rep. TCD-CS-2005-61, Department of Computer Science, University of Dublin, Trinity College, Dublin, Ireland.
|
| |
6
|
Casey, K., Gregg, D., and Ertl, A. 2005. Tiger---an interpreter generation tool. In International Conference on Compiler Construction (CC'05). Lecture Notes in Computer Science, vol. 3443. Springer Verlag, 246--249.
|
| |
7
|
Casey, K., Gregg, D., Ertl, M. A., and Nisbet, A. 2003. Towards superinstructions for Java interpeters. In Proceedings of the 7th International Workshoop on Software and Compilers for Embedded Systems (SCOPES'03), A. Krall, Ed. Lecture Notes in Computer Science, Vol. 2826. 329--343.
|
 |
8
|
|
| |
9
|
|
 |
10
|
|
 |
11
|
|
| |
12
|
Ertl, M. A. and Gregg, D. 2003b. The structure and performance of Efficient interpreters. J. Instruc.-Lev. Paral. 5. http://www.jilp.org/vol5/.
|
| |
13
|
Ertl, M. A. and Gregg, D. 2006. Optimizing Interpreters for Processors with Branch Target Buffers. Tech. rep. TCD-CS-2006-51, Department of Computer Science, University of Dublin, Trinity College, Dublin, Ireland.
|
| |
14
|
|
| |
15
|
Ertl, M. A., Thalinger, C., and Krall, A. 2006. Superinstructions and replication in the Cacao JVM interpreter. J. .Net Techn. 4, 1, 31--38.
|
| |
16
|
|
| |
17
|
Gagnon, E. and Hendren, L. J. 2003. Effective inline-threaded interpretation of Java bytecode using preparation sequences. In Proceedings of Compiler Construction, 12th International Conference (CC'03). The Joint European Conferences on Theory and Practice of Software, ETAPS'03. 170--184.
|
| |
18
|
|
| |
19
|
Gochman, S., Ronen, R., Anati, I., Berkovits, A., Kurts, T., Naveh, A., Saeed, A., Sperber, Z., and Valentine, R. 2003. The Intel Pentium M processor: microarchitecture and performance. Intel Tech. J. 7, 2, 20--36.
|
| |
20
|
|
| |
21
|
|
| |
22
|
Kaeli, D. R. and Emma, P. G. 1994. Case block table for holding multi-way branches. US Patent No. 5,333,283.
|
| |
23
|
|
| |
24
|
Kalamatianos, J. and Kaeli, D. 1999. Indirect branch prediction using data compression techniques. J. Instruc. Lev. Paral.
|
 |
25
|
|
 |
26
|
|
 |
27
|
|
 |
28
|
|
 |
29
|
Theodore H. Romer , Dennis Lee , Geoffrey M. Voelker , Alec Wolman , Wayne A. Wong , Jean-Loup Baer , Brian N. Bershad , Henry M. Levy, The structure and performance of interpreters, Proceedings of the seventh international conference on Architectural support for programming languages and operating systems, p.150-159, October 01-04, 1996, Cambridge, Massachusetts, United States
|
| |
30
|
Rossi, M. and Sivalingam, K. 1996. A survey of instruction dispatch techniques for byte-code interpreters. Tech. rep. TKO-C79, Faculty of Information Technology, Helsinki University of Technology.
|
| |
31
|
|
| |
32
|
|
| |
33
|
Sun-Microsystems. 2001. The Java Hotspot virtual machine. Tech. rep., Sun Microsystems Inc.
|
 |
34
|
|
 |
35
|
|
 |
36
|
|
|