Abstract
Loop optimizations such as loop unrolling, unfolding and invariant code motion have long been used in a wide variety of compilers to improve the running time of applications. In this paper we present a series of experimental results detailing the effect these techniques have on the running time of Java applications following ahead of time optimization.
We also detail the optimization tools and transformations developed for this paper which extend the SOOT framework discussed in a number of previous papers on the subject.
Our experimentation, conducted on the SciMark 2.0 benchmarking suite, demonstrates that when optimized using the techniques mentioned, Java applications can benefit from performance improvements of up to 20%.
We finish with a discussion of the results obtained, including results on how the optimizations affect JIT compilation and class size and proceed to argue that ahead-of-time loop unrolling and unfolding optimization may have a role to play in improving the performance of Java applications, particularly in scientific applications.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Appel, A.W.: Modern Compiler Implementation in Java. Cambridge Press, New York (2002)
Bacon, D.F., Graham Susan, L., Sharp, O.J.: Compiler Transformations for High-Performance Computing. ACM Computing Surveys 26(4), 345–420 (1994)
SPEC JVM 1998 Client Benchmarks. World Wide Web, http://www.spec.org/osg/jvm98/
Bull, J.M., Smith, L.A., Pottage, L., Freeman, R.: Benchmarking java against c and fortran for scientific applications. In: Proceedings of the 2001 joint ACM-ISCOPE conference on Java Grande, pp. 97–105. ACM Press, New York (2001)
Cierniak, M., Li, W.: Just in time optimizations for high performance java programs. Concurrency: Practice and Experience (1997)
Clausen, L.R.: A java bytecode optimizer using side effect analysis. Concurrency: Practice and Experience (1997)
Cohen, G.A., Chase, J.S., Kaminsky, D.L.: Automatic program transformation with joie. In: Proceedings of the USENIX 1998 Annual Technical Conference, pp. 167–178. USENIX Association (1998)
Davidson, J.W., Jinturkar, S.: An agressive approach to loop unrolling. Technical report, University of Virginia (2001)
Dean, J., De Fouw, G., Grove, D., Litvino, V., Chambers, C.: Vortex: An optimizing compiler for object-oriented languages. In: Proceedings OOPSLA 1996 Conference on Object-Oriented Programming Systems, Languages and Applications, vol. 31, pp. 83–100. ACM Sigplan (1996)
Dongarra, J.J., Hinds, A.R.: Unrolling loops in fortran. Software Practice and Experience 9(3), 219–226 (1979)
Ellis, J.R.: Bulldog: A Compiler for VLIW Architectures. MIT Press, Cambridge (1987)
Fitzgerald, R., Knoblock, T.B., Ruf, E., Steensgaard, B., Tarditi, D.: Marmot: an optimizing compiler for java. Technical report, Microsoft Research (1998)
Grune, D., Bal, H., Jacobs, C., Langendoen, K.: Modern Compiler Design. John Wiley and Sons, Chichester (2000)
Le, A., Lhoták, O., Hendren, L.: Using inter-procedural side-effect information in JIT optimizations. In: Bodik, R. (ed.) CC 2005. LNCS, vol. 3443, pp. 287–304. Springer, Heidelberg (2005)
Lee, H.B., Zorn, B.G.: A tool for instrumenting java bytecodes. In: The USENIX Symposium on Internet Technologies and Systems, pp. 73–82 (1997)
Muchnick, S.S.: Advanced Compiler Design and Implementation, pp. 559–563. Morgan Kaufmann, San Francisco (1997)
Mohan Krishna Reddy, B.V.: A work bench for loop transformation. Master’s thesis, Indian Institute of Technology, Kanpur (May 2001)
Song, L., Kavi, K.: What can we gain by Unfolding Loops? SIGPLAN Not. 39(2), 26–33 (2004)
SciMark 2.0 Benchmarking Suite. World Wide Web, http://math.nist.gov/scimark2/
Tip, F., Laffra, C., Sweeney, P.F., Streeter, D.: Practical experience with an application extractor for java. Technical Report RC 21451, IBM Research (1999)
Vallee-Rai, R., Phong, C., Etienne, G., Laurie, H., Patrick, L., Vijay, S.: Soot - a Java bytecode optimization framework (1999)
Vallee-Rai, R., Gagnon, E., Hendren, L.J., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? In: Computational Complexity, pp. 18–34 (2000)
Vallee-Rai, R., Hendren, L.J.: Jimple: Simplifying Java Bytecode for Analyses and Transformations
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hammond, S., Lacey, D. (2006). Loop Transformations in the Ahead-of-Time Optimization of Java Bytecode. In: Mycroft, A., Zeller, A. (eds) Compiler Construction. CC 2006. Lecture Notes in Computer Science, vol 3923. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11688839_11
Download citation
DOI: https://doi.org/10.1007/11688839_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-33050-9
Online ISBN: 978-3-540-33051-6
eBook Packages: Computer ScienceComputer Science (R0)