The Impact of Java Applications at Microarchitectural Level from Branch Prediction Perspective


  • Adrian Florea "Lucian Blaga" University of Sibiu, Computer Science Department Emil Cioran Street, No. 4, Sibiu 550025, Romania
  • Arpad Gellert Adrian Florea, , Lucian N. Vin¸tan "Lucian Blaga" University of Sibiu, Computer Science Department Emil Cioran Street, No. 4, Sibiu 550025, Romania
  • Lucian N. Vințan "Lucian Blaga" University of Sibiu, Computer Science Department Emil Cioran Street, No. 4, Sibiu 550025, Romania
  • Marius N. Velțan SC IMC Information Multimedia Communications SRL Sibiu, Product Development Department Cristian Street, No. 21, Sibiu 550073, Romania


object-oriented programs, branch prediction, indirect jumps/calls, unbiased branches, benchmarking


The portability, the object-oriented and distributed programming models, multithreading support and automatic garbage collection are features that make Java very attractive for application developers. The main goal of this paper consists in pointing out the impact of Java applications at microarchitectural level from two perspectives: unbiased branches and indirect jumps/calls, such branches limiting the ceiling of dynamic branch prediction and causing significant performance degradation. Therefore, accurately predicting this kind of branches remains an open problem. The simulation part of the paper mainly refers to determining the context length influence on the percentage of unbiased branches from Java applications, the prediction accuracy and the usage degree obtained using a Fast Path-Based Perceptron predictor. We realize a comparison with C/C++ application behavior from unbiased branches perspective. We also analyze some Java testing programs, built using design patterns or including inheritance, polymorphism, backtracking and recursivity, in order to determine the features of indirect branches, the arity of each indirect jump and the prediction accuracy using the Target Cache predictor.


Gosling J., Java: a Tour of the Landscape, Sun Technology Days at a Glance, Frankfurt, Germany, 3-5 December, 2007.

Calder B., Grunwald D., Zorn B., Quantifying behavioral differences between C and C++ programs, Journal of Programming Languages, Volume 2, Issue 4, 1994, pp. 313-351.

Florea A., Vințan L., Mihu I.Z., Understanding and Predicting Indirect Branch Behavior, Studies in Informatics and Control, Volume13, Issue 1, March 2004, pp. 61-82, National Institute for Research and Development in Informatics, Bucharest.

Alpern B., Cocchi A., Fink S., Grove D., Lieber D., Efficient implementation of Java interfaces: Invoke interface considered harmless, In Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 108-124, October 14-18, 2001, Tampa, Florida, USA.

Joao J.A., Mutlu O., Kim H., Agarwal R., Patt Y., Improving the Performance of Object-Oriented Languages with Dynamic Predication of Indirect Jumps, ACM SIGOPS Operating Systems Review, Volume 42, Issue 2, March 2008, pp. 80-90.

Vințan L., Gellert A., Florea A., Oancea M., Egan C. Understanding Prediction Limits through Unbiased Branches, Lecture Notes in Computer Science, Advances in Computer Systems Architecture, vol. 4186, pp. 480-487, 2006, Springer-Verlag Berlin.

Gellert A., Florea A., Vințan M., Egan C., Vințan L. Unbiased Branches: An Open Problem, Lecture Notes in Computer Science, Advances in Computer Systems Architecture, vol. 4697, pp. 16-27, 2007, Springer-Verlag Berlin / Heidelberg.

Radu C., Calborean H., Crapciu A., Gellert A., Florea A., An Interactive Graphical Trace-Driven Simulator for Teaching Branch Prediction in Computer Architecture, The 6th EUROSIM Congress on Modeling and Simulation, September 9-13, 2007, pp. 58 (6 pg.), Ljubljana, Slovenia.

SPEC JVM98 benchmarks,

Jiménez D. Fast Path-Based Neural Branch Prediction, Proceedings of the 36th Annual International Symposium on Microarchitecture, December 3-5, 2003, pp. 243-252, San Diego, CA, USA.

Freeman E., Freeman E., Sierra K., Bates B. Head First Design Patterns, O'Reilly Publishing House, First Edition, October 2004.

Veltan N.M. The Interaction of Java Programs at Microarchitectural Level from Branch Prediction Viewpoint (in Romanian), MSc Thesis, 'Lucian Blaga' University of Sibiu, Computer Science Department, Romania, 2008.

The University of Massachusetts Amherst and the University of Texas - Dynamic SimpleSscalar, 2004.

Lindholm T., Yellin F., The JavaTM Virtual Machine Specification, Sun Press Publishing Hall, 1999.

Chang P.Y., E. Hao, Y.N. Patt., Target Prediction for Indirect Jumps, Proceedings of the International Symposium on Computer Architecture, 1997.

Jiménez D., Lin C. Neural Methods for Dynamic Branch Prediction, ACM Transactions on Computer Systems, Vol. 20, Issue 4, November 2002, pp. 369-397, New York, USA.

Jiménez D., Idealized Piecewise Linear Branch Prediction, Journal of Instruction-Level Parallelism, Vol. 7, April, 2005, pp. 1-11.

Loh G. H., Jiménez D., Reducing the Power and Complexity of Path-Based Neural Branch Prediction, Proceedings of the 5th Workshop on Complexity Effective Design (WCED5), pp. 1-8, June 5, 2005, Madison, WI, USA.

Burger D., Austin T., The SimpleScalar Tool Set, Version 2.0, University of Wisconsin Madison, USA, Computer Science Department, Technical Report no. 1342, June, 1997.

Bowers K. R., Kaeli D., Characterizing the SPEC JVM98 benchmarks on the Java virtual machine, Technical Report, Northeastern University, ECE Department, Computer Architecture Group, 1998, pp. 1-20, Boston, Massachusetts, USA.

Florea A., The dynamic values prediction in the next generation microprocessors (in Romanian), MatrixRom Publishing House, 2005, Bucharest.

Tao Li, Lizy K. John, Adapting Branch-Target Buffer to Improve the Target Predictability of Java Code, ACM Transactions on Architecture and Code Optimization, Volume 2, Issue 2, June 2005, pp. 109-130.

Florea A., Vințan L., Advanced techniques for improving indirect branch prediction accuracy, Proceedings of 19th European Conference on Modelling and Simulation, June 2005, pp. 750-759, Riga, Latvia.

Florea A., Radu C., Calborean H., Crapciu A., Gellert A., Vințan L., Designing an Advanced Simulator for Unbiased Branches Prediction, Proceedings of 9th International Symposium on Automatic Control and Computer Science, ISSN 1843-665X, Iasi, 2007.



Most read articles by the same author(s)

Obs.: This plugin requires at least one statistics/report plugin to be enabled. If your statistics plugins provide more than one metric then please also select a main metric on the admin's site settings page and/or on the journal manager's settings pages.