skip to main content
Empirical analysis of a LISP system
Publisher:
  • Stanford University
  • 408 Panama Mall, Suite 217
  • Stanford
  • CA
  • United States
Order Number:Order No: GAX88-15047
Bibliometrics
Skip Abstract Section
Abstract

We have analyzed four large Lisp programs running in a Common Lisp system on a conventional processor to provide information useful for implementers of new Lisp systems. The execution of over fifty million Lisp function calls (over one billion host instructions) are represented in the results. We address some possible implementation tradeoffs and provide pertinent empirical information. Among the issues discussed are data tagging techniques, quantity of tags, time and space efficient representations for Lisp data types, methods of function linkage, the nature of variable access, the use of tail-recursion and non-local goto's, and garbage collection. Our findings indicate that for many conventional processors choices should include a small number of tag values encoded in the low-order bits of a data reference, a simple "car followed by cdr" organization for CONS cells, and an encoding of symbols which segregates the different fields.

Garbage collection frequently represents a sizable portion of overall execution time. The new "generation" garbage collectors can provide dramatic performance improvements, but require the maintenance of entry vector and data age information. To maintain the entry vector, previous generation collectors have included runtime tests (generation checks) at each tagged store operation. For our Lisp system the cost of these checks in software is projected to be at least 7% of runtime.

We describe a new version of generation garbage collection adapted for Lisp on conventional processors. Our version eliminates generation checks during normal execution: information maintained by the virtual memory system is used to construct the entry vector. A simple memory layout is employed which does not require storage for age information (other than one value per generation) and allows adjustment of the boundaries between generations to avoid fragmentation and maximize memory utilization in implementations with limited memory. An analysis of the new algorithm on the test system showed that, when collections were separated by more than 1.4 seconds (or at least 160 kilobytes of new allocation), using virtual memory information required less time than software generation checks.

Cited By

  1. He Y, Yang C and Li X Improve google android user experience with regional garbage collection Proceedings of the 8th IFIP international conference on Network and parallel computing, (350-365)
  2. ACM
    Xian F, Srisa-an W and Jiang H Allocation-phase aware thread scheduling policies to improve garbage collection performance Proceedings of the 6th international symposium on Memory management, (79-90)
  3. Willard B and Frieder O (2000). Autonomous garbage collection, Computer Communications, 23:10, (887-900), Online publication date: 1-May-2000.
  4. ACM
    Cheng P, Harper R and Lee P Generational stack collection and profile-driven pretenuring Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, (162-173)
  5. ACM
    Cheng P, Harper R and Lee P (1998). Generational stack collection and profile-driven pretenuring, ACM SIGPLAN Notices, 33:5, (162-173), Online publication date: 1-May-1998.
  6. Cook J, Wolf A and Zorn B (1998). A Highly Effective Partition Selection Policy for Object Database Garbage Collection, IEEE Transactions on Knowledge and Data Engineering, 10:1, (153-172), Online publication date: 1-Jan-1998.
  7. Jacobs J and Swanson M (2019). UCL+P—Defining and Implementing Persistent Common Lisp, Lisp and Symbolic Computation, 10:1, (5-38), Online publication date: 1-Jun-1997.
  8. ACM
    Cook J, Wolf A and Zorn B Partition selection policies in object database garbage collection Proceedings of the 1994 ACM SIGMOD international conference on Management of data, (371-382)
  9. ACM
    Cook J, Wolf A and Zorn B (2019). Partition selection policies in object database garbage collection, ACM SIGMOD Record, 23:2, (371-382), Online publication date: 1-Jun-1994.
  10. ACM
    Wilson P, Lam M and Moher T Caching considerations for generational garbage collection Proceedings of the 1992 ACM conference on LISP and functional programming, (32-42)
  11. ACM
    Wilson P, Lam M and Moher T (2019). Caching considerations for generational garbage collection, ACM SIGPLAN Lisp Pointers, V:1, (32-42), Online publication date: 1-Jan-1992.
  12. ACM
    Hosking A, Moss J and Stefanovic D (2019). A comparative performance evaluation of write barrier implementation, ACM SIGPLAN Notices, 27:10, (92-109), Online publication date: 31-Oct-1992.
  13. ACM
    Hosking A, Moss J and Stefanovic D A comparative performance evaluation of write barrier implementation Conference proceedings on Object-oriented programming systems, languages, and applications, (92-109)
  14. ACM
    Wilson P, Lam M and Moher T Effective “static-graph” reorganization to improve locality in garbage-collected systems Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, (177-191)
  15. ACM
    Wilson P, Lam M and Moher T (2019). Effective “static-graph” reorganization to improve locality in garbage-collected systems, ACM SIGPLAN Notices, 26:6, (177-191), Online publication date: 1-Jun-1991.
  16. ACM
    Layer D and Richardson C (1991). Lisp systems in the 1990s, Communications of the ACM, 34:9, (48-57), Online publication date: 1-Sep-1991.
  17. ACM
    Wilson P (1991). Some issues and strategies in heap management and memory hierarchies, ACM SIGPLAN Notices, 26:3, (45-52), Online publication date: 2-Jan-1991.
  18. ACM
    Johnson D Trap architectures for Lisp systems Proceedings of the 1990 ACM conference on LISP and functional programming, (79-86)
  19. ACM
    Zorn B Comparing mark-and sweep and stop-and-copy garbage collection Proceedings of the 1990 ACM conference on LISP and functional programming, (87-98)
  20. ACM
    Humphrey S and Krovetz B (1989). Selected AI-related dissertations, ACM SIGART Bulletin:108, (217-226), Online publication date: 1-Apr-1989.
  21. ACM
    Wilson P (1989). A simple bucket-brigade advancement mechanism for generation-bases garbage collection, ACM SIGPLAN Notices, 24:5, (38-46), Online publication date: 1-May-1989.
  22. ACM
    Wilson P and Moher T (1989). A “card-marking” scheme for controlling intergenerational references in generation-based garbage collection on stock hardware, ACM SIGPLAN Notices, 24:5, (87-92), Online publication date: 1-May-1989.
  23. ACM
    Wilson P and Moher T Demonic memory for process histories Proceedings of the ACM SIGPLAN 1989 conference on Programming language design and implementation, (330-343)
  24. ACM
    Wilson P and Moher T (2019). Demonic memory for process histories, ACM SIGPLAN Notices, 24:7, (330-343), Online publication date: 1-Jul-1989.
  25. ACM
    Wilson P and Moher T Design of the opportunistic garbage collector Conference proceedings on Object-oriented programming systems, languages and applications, (23-35)
  26. ACM
    Wilson P and Moher T (2019). Design of the opportunistic garbage collector, ACM SIGPLAN Notices, 24:10, (23-35), Online publication date: 1-Oct-1989.
  27. ACM
    Wilson P (1988). Opportunistic garbage collection, ACM SIGPLAN Notices, 23:12, (98-102), Online publication date: 1-Dec-1988.
Contributors
  • Stanford University

Recommendations