Article
A new list compaction method
Article first published online: 30 OCT 2006
DOI: 10.1002/spe.4380160206
Copyright © 1986 John Wiley & Sons, Ltd
Additional Information
How to Cite
Li, K. and Hudak, P. (1986), A new list compaction method. Software: Practice and Experience, 16: 145–163. doi: 10.1002/spe.4380160206
Publication History
- Issue published online: 30 OCT 2006
- Article first published online: 30 OCT 2006
- Manuscript Revised: 10 JUN 1985
- Manuscript Received: 7 JAN 1985
Funded by
- NSF. Grant Numbers: MCS-8302018, DCR-8106181
- Abstract
- References
- Cited By
Keywords:
- List structure;
- List compaction;
- Memory management;
- LISP programming;
- Shared-memory parallel;
- computing
Abstract
List compaction, or so-called ‘cdr-coding’, can greatly reduce the storage needs of list processing languages. However, existing methods do not perform well when several lists are being constructed simultaneously from the same heap, since the non-contiguous nature of the cells being allocated eliminates the opportunity for compaction. This situation arises not only in true parallel systems sharing a common memory, and sequential systems supporting multiple processes, but also quite often in purely sequential systems, where it is not uncommon to build several different lists simultaneously within a single loop. In this paper, a new list compaction method is presented that performs well during both sequential and ‘parallel’ list generation. The method is essentially a generalization of cdr-coding, in which lists are represented explicitly as linked vectors rather than implicitly as compacted memory. In addition, an encoding scheme is used that is as simple or simpler than all known encodings, and destructive operations are supported with no greater overhead than existing schemes. Performance figures in a simulated environment suggest that the strategy consistently performs better than conventional cdr-coding, with essentially the same complexity.

1097-024X/asset/olbannerleft.jpg?v=1&s=2d7d001211f2c40f177a231141601e9f52afc1f3)
1097-024X/asset/olbannerright.jpg?v=1&s=3aec7891a8ba78b361ead9743adfc0b6eae6369a)
1097-024X/asset/cover.gif?v=1&s=5a70ecca2928358eca4ff75b9921d0552ffb6539)