Measurements of Dynamic List Structure Use in Lisp

  • Authors:
  • D. W. Clark

  • Affiliations:
  • Xerox Palo Alto Research Center

  • Venue:
  • IEEE Transactions on Software Engineering
  • Year:
  • 1979

Quantified Score

Hi-index 0.01

Visualization

Abstract

This paper is an empirical study of how three large Lisp programs use their list structure during execution. Most list-cell references are due to the functions car and cdr, which are executed about equally often and greatly outnumber other primitive functions. Executions of cdr yield the atom NIL about 10 to 20 percent of the time, and nearby list cells most of the rest of the time. Executions of car yield atoms, small integers, and list cells in varying proportions in the three progrms. Atom references by car tend to concentrate on a small number of atoms. The function rplacd increases static pointer locality, but rplaca is used idiosyncratically. Repeated reference to list cells is likely: over half of all references were to one of the ten most recently referenced cells. Linearization is the rearrangement of lists so that consecutive cdr's are adjacent in memory whenever possible. This property deteriorates dowly after a list structure is linearized. If all of a program's lists are linearized, page faults are reduced slightly, but because of the high cost of a fault this small reduction has a large effect.