Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1029873.1029885acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
Article

Experiments on the effectiveness of an automatic insertion of memory reuses into ML-like programs

Published: 24 October 2004 Publication History

Abstract

We present extensive experimental results on our static analysis and source-level transformation [12, 11] that adds explicit memory-reuse commands into ML program text.
Our analysis and transformation cost is negligible (1,582 to 29,000 lines per seconds) enough to be used in daily programming. The payoff is the reduction of memory peaks and the total garbage collection time. The transformed programs reuse 3.4% to 93.9% of total allocated memory cells, and the memory peak is reduced by 0.0% to 71.9%. When the memory peak reduction is large enough to overcome the costs of dynamic flags and the memory reuse in the generational garbage collection, it speeds up program's execution by up to 39.1%. Otherwise, our transformation can slowdown programs by up to 7.3%. The speedup is likely only when the portion of garbage collection time among the total execution time is more than about 30%.

References

[1]
David Aspinall and Martin Hofmann. Another type system for in-place update. In Proceedings of the European Symposium on Programming, volume 2305 of Lecture Notes in Computer Science, pages 36--52, April 2002.]]
[2]
Erik Barendsen and Sjaak Smetsers. Uniqueness typing for functional languages with graph rewriting semantics. Mathematical Structures in Computer Science, 6:579--612, 1995.]]
[3]
Bruno Blanchet. Escape analysis: Correctness proof, implementation and experimental results. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 25--37, 1998.]]
[4]
Karl Crary, David Walker, and Greg Morrisett. Typed memory management in a calculus of capabilities. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 262--275, January 1999.]]
[5]
David Gay and Alex Aiken. Language support for regions. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 70--80, June 2001.]]
[6]
Ovidiu Gheorghioiu, Alexandru Sǎlcianu, and Martin Rinard. Interprocedural compatibility analysis for static object preallocation. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 273--284, January 2003.]]
[7]
Dan Grossman, Greg Morrisett, Trevor Jim, Michael Hicks, Yanling Wang, and James Cheney. Region-based memory management in Cyclone. In Proceedings of the ACM Conference on Programming Language Design and Implementation, June 2002.]]
[8]
Williams L. Harrison III. The interprocedural analysis and automatic parallelization of scheme programs. Lisp and Symbolic Computation, 2(3/4):179--396, 1989.]]
[9]
Samin Ishtiaq and Peter O'Hearn. BI as an assertion language for mutable data structures. In Proceedings of the ACM Symposium on Principles of Programming Languages, January 2001.]]
[10]
Naoki Kobayashi. Quasi-linear types. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 29--42, 1999.]]
[11]
Oukseh Lee, Hongseok Yang, and Kwangkeun Yi. Correctness proof on an algorithm to insert safe memory reuse commands. Technical Memorandum ROPAS-2003-19, Research On Program Analysis System, Seoul National University, November 2003. http://ropas.snu.ac.kr/memo.]]
[12]
Oukseh Lee, Hongseok Yang, and Kwangkeun Yi. Inserting safe memory reuse commands into ml-like programs. In Proceedings of the Annual International Static Analysis Symposium, volume 2694 of Lecture Notes in Computer Science, pages 171--188, San Diego, California, June 2003. Springer-Verlag.]]
[13]
Xavier Leroy, Damien Doligez, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon. The Objective Caml system release 3.06. Institut National de Recherche en Informatique et en Automatique, August 2002. http://caml.inria.fr.]]
[14]
Yosuhiko Minamide, Greg Morrisett, and Robert Harper. Typed closure conversion. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 271--283, January 1996.]]
[15]
M. Mohnen. Efficient compile-time garbage collection for arbitrary data structures. In Proceedings of Programming Languages: Implementations, Logics and Programs, number 982 in Lecture Notes in Computer Science, pages 241--258. Springer--Verlag, 1995.]]
[16]
nML programming language system, version 0.92b. Research On Program Analysis System, Seoul National University, April 2004. http://ropas.snu.ac.kr/n.]]
[17]
Peter O'Hearn, John C. Reynolds, and Hongseok Yang. Local reasoning about programs that alter data structures. In The Proceedings of Computer Science and Logic, pages 1--19, 2001.]]
[18]
John C. Reynolds. Separation logic: A logic for shared mutable data structures. In Proceedings of the Seventeenth Annual IEEE Symposium on Logic in Computer Science, July 2002.]]
[19]
Frederick Smith, David Walker, and Greg Morrisett. Alias types. In Proceedings of the European Symposium on Programming, volume 1782 of Lecture Notes in Computer Science, pages 366--382, March/April 2000.]]
[20]
The Standard ML of New Jersey, version 110.0.7. Bell Laboratories, Lucent Technologies, October 2000. http://cm.bell-labs.com/cm/cs/what/smlnj.]]
[21]
Mads Tofte and Lars Birkedal. A region inference algorithm. ACM Transactions on Programming Languages and Systems, 20(4):734--767, July 1998.]]
[22]
Mads Tofte, Lars Birkedal, Martin Elsman, Niels Hallenberg, Tommy Højfeld Olesen, and Peter Sestoft. Programming with regions in the ML Kit (for version 4). IT University of Copenhagen, April 2002. http://www.it-c.dk/research/mlkit.]]
[23]
Mads Tofte and Jean-Pierre Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 188--201, 1994.]]
[24]
Mads Tofte and Jean-Pierre Talpin. Region-based memory management. Information and Computation, 132(2):109--176, 1997.]]
[25]
David N. Turner, Philip Wadler, and Christian Mossin. Once upon a type. In International Conference on Functional Programming and Computer Architecture, pages 25--28, June 1995.]]
[26]
Philip Wadler. Linear types can change the world! In M. Broy and C. Jones, editors, Programming Concepts and Methods, Sea of Galilee, Israel, April 1990. North Holland.]]
[27]
David Walker and Greg Morrisett. Alias types for recursive data structures. In Workshop on Types in Compilation, volume 2071 of Lecture Notes in Computer Science, pages 177--206, September 2000.]]

Cited By

View all
  • (2010)Just-in-time compiler assisted object reclamation and space reuseProceedings of the 2010 IFIP international conference on Network and parallel computing10.5555/1882011.1882017(18-34)Online publication date: 13-Sep-2010
  • (2008)Object co-location and memory reuse for Java programsACM Transactions on Architecture and Code Optimization10.1145/1328195.13281994:4(1-36)Online publication date: 30-Jan-2008
  • (2006)Free-MeProceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1133981.1134024(364-375)Online publication date: 11-Jun-2006
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISMM '04: Proceedings of the 4th international symposium on Memory management
October 2004
182 pages
ISBN:1581139454
DOI:10.1145/1029873
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 October 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. memory management
  2. program analysis
  3. program transformation

Qualifiers

  • Article

Conference

ISMM04
Sponsor:

Acceptance Rates

Overall Acceptance Rate 72 of 156 submissions, 46%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)1
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2010)Just-in-time compiler assisted object reclamation and space reuseProceedings of the 2010 IFIP international conference on Network and parallel computing10.5555/1882011.1882017(18-34)Online publication date: 13-Sep-2010
  • (2008)Object co-location and memory reuse for Java programsACM Transactions on Architecture and Code Optimization10.1145/1328195.13281994:4(1-36)Online publication date: 30-Jan-2008
  • (2006)Free-MeProceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1133981.1134024(364-375)Online publication date: 11-Jun-2006
  • (2006)Free-MeACM SIGPLAN Notices10.1145/1133255.113402441:6(364-375)Online publication date: 11-Jun-2006

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media