Nothing Special   »   [go: up one dir, main page]

Skip to main content

Customization of Java Library Classes Using Type Constraints and Profile Information

  • Conference paper
ECOOP 2004 – Object-Oriented Programming (ECOOP 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3086))

Included in the following conference series:

Abstract

The use of class libraries increases programmer productivity by allowing programmers to focus on the functionality unique to their application. However, library classes are generally designed with some typical usage pattern in mind, and performance may be suboptimal if the actual usage differs. We present an approach for rewriting applications to use customized versions of library classes that are generated using a combination of static analysis and profile information. Type constraints are used to determine where customized classes may be used, and profile information is used to determine where customization is likely to be profitable. We applied this approach to a number of Java applications by customizing various standard container classes and the omnipresent StringBuffer class, and measured speedups up to 78% and memory footprint reductions up to 46%. The increase in application size due to the added custom classes is limited to 12% for all but the smallest programs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Beckmann, B., Wang, X.: Adaptive prefetching Java objects (manuscript)

    Google Scholar 

  2. Cai, J., Paige, R.: Towards increased productivity of algorithm implementation. In: Proc. 1st ACM SIGSOFT symposium on Foundations of software engineering, pp. 71–78 (1993)

    Google Scholar 

  3. Calder, B., Feller, P., Eustace, A.: Value profiling. In: Proceedings of the 30th annual ACM/IEEE International Symposium on Microarchitecture (ISCA 1997), pp. 259–269 (1997)

    Google Scholar 

  4. Chambers, C., Ungar, D.: Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language. ACM SIGPLAN Notices 24(7), 146–160 (1989)

    Article  Google Scholar 

  5. Choi, J.-D., Gupta, M., Serrano, M.J., Sreedhar, V.C., Midkiff, S.P.: Stack allocation and synchronization optimizations for java using escape analysis. ACM Transactions on Programming Languages and Systems 25(6), 876–910 (2003)

    Article  Google Scholar 

  6. Chung, E.-Y., Benini, L., De Micheli, G.: Automatic source code specialization for energy reduction. In: Proceedings of the 2001 International Symposium on Low Power Electronics and Design (ISPLED 2001), pp. 80–83 (2001)

    Google Scholar 

  7. Cooper, K., Hall, M.W., Kennedy, K.: A methodology for procedure cloning. Computer Languages (may 1995)

    Google Scholar 

  8. Czarnecki, K., Eisenecker, U.: Generative Programming: Methods, Techniques, and Applications. Addison-Wesley, Reading (1999)

    Google Scholar 

  9. Dewar, R.K., Arthur, L.S.-C., Schwartz, J.T., Schonberg, E.: Programming by refinement, as exemplified by the SETL representation sublanguage. ACM Transactions on Programming Languages and Systems (TOPLAS) 1(1), 27–49 (1979)

    Article  MATH  Google Scholar 

  10. Fowler, M.: Refactoring. Improving the Design of Existing Code. Addison-Wesley, Reading (1999)

    Google Scholar 

  11. Friedman, S., Leidenfrost, N., Brodie, B., Cytron, R.: Hashtables for embedded and real-time systems. In: IEEE Real-Time Embedded System Workshop (2001)

    Google Scholar 

  12. Glew, N., Palsberg, J.: Type-safe method inlining. In: Proc. 16th European Conference on Object-Oriented Programming, pp. 525–544 (2002)

    Google Scholar 

  13. Hind, M., Pioli, A.: Evaluating the effectiveness of pointer alias analyses. Science of Computer Programming 39(1), 31–55 (2001)

    Article  MATH  Google Scholar 

  14. Högstedt, K., D., K., Rajan, V., Roth, T., Sreedhar, V., Wegman, M., Wang, N.: The autonomic performance prescription. Available from the author at wegman@watson.ibm.com

    Google Scholar 

  15. Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  16. Lindholm, T., Yellin, F.: The Java Virtual Machine Specification. Addison-Wesley, Reading (1997)

    Google Scholar 

  17. Palsberg, J.: Type-based analysis and applications. In: ACM Workshop on Program Analysis for Software Tools and Engineering (PASTE 2001), Snowbird, UT, pp. 20–27 (2001)

    Google Scholar 

  18. Palsberg, J., Schwartzbach, M.: Object-Oriented Type Systems. John Wiley & Sons, Chichester (1993)

    Google Scholar 

  19. Pavlovic, D., Smith, D.: Software development by refinement. In: UNU/IIST 10th Anniversary Colloqium, Formal Methods at the Crossroads: From Panaea to Foundational Support, Springer, Heidelberg (2003)

    Google Scholar 

  20. Rountev, A., Milanova, A., Ryder, B.: Points-to analysis for Java using annotated constraints. In: Proc. 16th Annual Conf. on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA 2001), Tampa Bay, FL, pp. 43–55 (2001)

    Google Scholar 

  21. Ryder, B.G.: Dimensions of precision in reference analysis of object-oriented programming languages. In: Proc. 12th International Conference on Compiler Construction (CC 2003), Warsaw, Poland, April 2003, pp. 126–137 (2003)

    Google Scholar 

  22. Schonberg, E., Schwartz, J., Sharir, M.: An automatic technique for selection of data representations in SETL programs. ACM Transactions on Programming Languages and Systems 3(2), 126–143 (1981)

    Article  MATH  Google Scholar 

  23. Schultz, U.P., Lawall, J.L., Consel, C.: Automatic program specialization for java. ACM Transactions on Programming Languages and Systems 25(4), 452–499 (2003)

    Article  Google Scholar 

  24. Sirkin, M., Batory, D., Singhal, V.: Software components in a data structure precompiler. In: Proceedings of the 15th International Conference on Software Engineering (ICSE 1997), pp. 437–446 (1997)

    Google Scholar 

  25. Tip, F., Kieżun, A., Bäumer, D.: Refactoring for generalizations using type constraints. In: Proc. 18th Annual Conf. on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA 2003 (2003)

    Google Scholar 

  26. Tip, F., Sweeney, P.F., Laffra, C., Eisma, A., Streeter, D.: Practical extraction techniques for Java. ACM Transactions on Programming Languages and Systems 24(6), 625–666 (2002)

    Article  Google Scholar 

  27. Veldhuizen, T.L., Gannon, D.: Active libraries: Rethinking the roles of compilers and libraries. In: Proceedings of the SIAM Workshop on Object Oriented Methods for Inter-operable Scientific and Engineering Computing, OO 1998 (1998)

    Google Scholar 

  28. Yellin, D.: Competitive algorithms for the dynamic selection of component implementations. IBM Systems Journal 42(1), 85–97 (2003)

    Article  MathSciNet  Google Scholar 

  29. Yotov, K., Li, X., Ren, G., Cibulskis, M., DeJong, G., Garzaran, M., Padua, D., Pingali, K., Stodghill, P., Wu, P.: Comparison of empirical and model-driven optimization. In: Proc. ACM SIGPLAN 2003 conference on Programming language design and implementation, pp. 63–76 (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

De Sutter, B., Tip, F., Dolby, J. (2004). Customization of Java Library Classes Using Type Constraints and Profile Information. In: Odersky, M. (eds) ECOOP 2004 – Object-Oriented Programming. ECOOP 2004. Lecture Notes in Computer Science, vol 3086. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24851-4_27

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24851-4_27

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22159-3

  • Online ISBN: 978-3-540-24851-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics