skip to main content
research-article

Optimization coaching: optimizers learn to communicate with programmers

Published:19 October 2012Publication History
Skip Abstract Section

Abstract

Optimizing compilers map programs in high-level languages to high-performance target language code. To most programmers, such a compiler constitutes an impenetrable black box whose inner workings are beyond their understanding. Since programmers often must understand the workings of their compilers to achieve their desired performance goals, they typically resort to various forms of reverse engineering, such as examining compiled code or intermediate forms. Instead, optimizing compilers should engage programmers in a dialog. This paper introduces one such possible form of dialog: optimization coaching. An optimization coach watches while a program is compiled, analyzes the results, generates suggestions for enabling further compiler optimization in the source program, and presents a suitable synthesis of its results to the programmer. We present an evaluation based on case studies, which illustrate how an optimization coach can help programmers achieve optimizations resulting in substantial performance improvements.

References

  1. Norman Adams, David Kranz, Richard Kelsey, Jonathan Rees, Paul Hudak, and James Philbin. ORBIT: an optimizing compiler for Scheme. In Proc. Symp. on Compiler Construction, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Erik Altman, Matthew Arnold, Stephen Fink, and Nick Mitchell. Performance analysis of idle programs. In Proc. Conf. Object-Oriented Programming Systems, Languages, and Applications, pp. 739--753, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Glenn Ammons, Jong-Deok Choi, Manish Gupta, and Nikhil Swamy. Finding and removing performance bottlenecks in large systems. In Proc. European Conf. on Object-Oriented Programming, pp. 172--196, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. Andrew Appel and Trevor Jim. Continuation-passing, closure-passing style. In Proc. Symp. on Principles of Programming Languages, pp. 293--302, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. David Binkley, Bruce Duncan, Brennan Jubb, and April Wielgosz. The FeedBack compiler. In Proc. International Works. on Program Comprehension, pp. 198--206, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. John Clements, Matthew Flatt, and Matthias Felleisen. Modeling an algebraic stepper. In Proc. European Symp. on Programming, pp. 320--334, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ryan Culpepper and Matthias Felleisen. Debugging hygienic macros. Science of Computer Programming 75(7), pp. 496--515, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jeffrey Dean, David Grove, and Craig Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proc. European Conf. on Object-Oriented Programming, pp. 77--101, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Robert Bruce Findler, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paul Steckler, and Matthias Felleisen. DrScheme: a programming environment for Scheme. J. of Functional Programming 12(2), pp. 159--182, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Stephanie Weirich, and Matthias Felleisen. Catching bugs in the web of program invariants. In Proc. Conf. on Programming Language Design and Implementation, pp. 23--32, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Matthew Flatt and PLT. Reference: Racket. PLT Inc., PLT-TR-2010-1, 2010. http://racket-lang.org/tr1/Google ScholarGoogle Scholar
  12. Agner Fog. Software optimization resources. 2012. http://www.agner.org/optimize/Google ScholarGoogle Scholar
  13. Christopher W. Fraser and David R. Hanson. A Retargetable C Compiler: Design and Implementation. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Saturnino Garcia, Donghwan Jeon, Chris Louie, and Michael Bed-ford Taylor. Kremlin: rethinking and rebooting gprof for the multicore age. In Proc. Programming Language Design and Implementation, pp. 458--469, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Brian Hackett and Shu-Yu Guo. Fast and precise type inference for JavaScript. In Proc. Conf. on Programming Language Design and Implementation, pp. 239--250, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. William von Hagen. The Definitive Guide to GCC. Apress, 2006.Google ScholarGoogle ScholarCross RefCross Ref
  17. Guoliang Jin, Linhai Song, Xiaoming Shi, Joel Scherpelz, and Shan Lu. Understanding and detecting real-world performance bugs. In Proc. Conf. on Programming Language Design and Implementation, pp. 77--88, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Milan Jovic, Andrea Adamoli, and Matthias Hauswirth. Catch me of you can: performance bug detection in the wild. In Proc. Conf. Object-Oriented Programming Systems, Languages, and Applications, pp. 155--170, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Donald E. Knuth. An empirical study of FORTRAN programs. Software--Practice and Experience 1, pp. 105--133, 1971.Google ScholarGoogle ScholarCross RefCross Ref
  20. Xavier Leroy. Unboxed objects and polymorphic typing. In Proc. Symp. on Principles of Programming Languages, pp. 177--188, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Peter A. W. Lewis, A. S. Goodman, and J. M. Miller. A pseudo-random number generator for the System/360. IBM Systems Journal 8(2), pp. 136--146, 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Jennifer Lhoták, Ondrej Lhoták, and Laurie J. Hendren. Integrating the Soot compiler infrastructure into an IDE. In Proc. Symp. on Compiler Construction, pp. 281--297, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  23. Stephen S. Muchnick. Advanced Compiler Design and Implementation. Morgan-Kaufmann, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Simon L Peyton Jones. Compiling Haskell by program transformation a report from the trenches. In Proc. European Symp. on Programming, pp. 18--44, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Feng Qian, Laurie J. Hendren, and Clark Verbrugge. A comprehensive approach to array bounds check elimination for Java. In Proc. Symp. on Compiler Construction, pp. 325--342, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Manuel Serrano. Inline expansion: when and how. In Proc. International Symp. on Programming Language Implementation and Logic Programming, pp. 143--147, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Zhong Shao and Andrew Appel. A type-based compiler for standardML. In Proc. Conf. on Programming Language Design and Implementation, pp. 116--129, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Jennifer Elizabeth Shaw. Visualisation Tools for Optimizing Compilers. MS dissertation, McGill University, 2005.Google ScholarGoogle Scholar
  29. Vincent St. Amour, Sam Tobin-Hochstadt, Matthew Flatt, and Matthias Felleisen. Typing the numeric tower. In Proc. International Symp. on Practical Aspects of Declarative Languages, pp. 289--303, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. The Free Software Foundation. GCC 4.7.0 Manual. 2012.Google ScholarGoogle Scholar
  31. The GHC Team. The Glorious Glasgow Haskell Compilation System User's Guide, Version 7.4.1. 2011.Google ScholarGoogle Scholar
  32. The SBCL Team. SBCL 1.0.55 User Manual. 2012.Google ScholarGoogle Scholar
  33. Sam Tobin-Hochstadt, Vincent St-Amour, Ryan Culpepper, Matthew Flatt, and Matthias Felleisen. Languages as libraries. In Proc. Programming Language Design and Implementation, pp. 132--141, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Raja Vallée-Rai, Etienne Gagnon, Laurie J. Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. Optimizing Java bytecode using the Soot framework: is it feasible? In Proc. Symp. on Compiler Construction, pp. 18--34, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Michael Wolfe. Loop skewing: the wavefront method revisited. J. of Parallel Programming 15(4), pp. 279--293, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Nicholas C. Zakas. High Performance JavaScript. O'Reilly, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Optimization coaching: optimizers learn to communicate with programmers

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 47, Issue 10
      OOPSLA '12
      October 2012
      1011 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2398857
      Issue’s Table of Contents
      • cover image ACM Conferences
        OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
        October 2012
        1052 pages
        ISBN:9781450315616
        DOI:10.1145/2384616

      Copyright © 2012 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 October 2012

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!