Fast Functional Lists

  • Phil Bagwell
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2670)


Since J. McCarthy first introduced Functional Programming, the Linked List has almost universally been used as the underpinning data structure. This paper introduces a new data structure, the VList, that is compact, thread safe and significantly faster to use than Linked Lists for nearly all list operations. Space usage can be reduced by 50% to 90% and in typical list operations speed improved by factors ranging from 4 to 20 or more. Some important operations such as indexing and length are typically changed from O(N) to O(1) and O(lgN) respectively. In the current form the VList structure can provide an alternative heap architecture for functional languages using eager evaluation. To prove the viability of the new structure a language interpreter Visp, a dialect of Common Lisp, has been implemented using VList and a simple benchmark comparison with OCAML reported.


Garbage Collection Functional Language List Structure List Operation Small List 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Zhong Shao and John H. Reppy and Andrew W. Appel: Unrolling Lists. Conference record of the 1994 (ACM) Conference on Lisp and Functional Programming (1994) 185–191Google Scholar
  2. 2.
    Zhong Shao: Compiling Standard ML for Efficient Execution on Modern Machines (Thesis) TR-475-94 (1994) 169Google Scholar
  3. 3.
    WJ Hansen: Compact list representation: definition, garbage collection and system implementation. Communications of the ACM (1969) 12/9, 499zbMATHCrossRefGoogle Scholar
  4. 4.
    D. W. Clark and C. C. Green: An empirical study of list structure in LISP. Communications of the ACM (Feb 1977) 20/2, 78–87zbMATHCrossRefGoogle Scholar
  5. 5.
    Chris Okasaki: Purely Functional Random-Access Lists. Functional Programming Languages and Computer Architecture (1995) 86–95Google Scholar
  6. 6.
    K. Li and P. Hudak: A new list compaction method. Software-Practice and Experience (Feb 1986) 16/2, 145–163zbMATHCrossRefGoogle Scholar
  7. 7.
    R Greenblatt: LISP Machine Progress Report memo 444 (Aug 1977) 169 A.I. Lab., M.I.T., Cambridge, Mass.Google Scholar
  8. 8.
    D.W. Clark: List Structure: Measurements, Algorithms, and Encodings, (Ph.D. Thesis Aug 1976) Dept. of Computer Science, Carnegie-Mellon UniversityGoogle Scholar
  9. 9.
    D. G. Bobrow and D. W. Clark: Compact encoding of list structures. ACM Transactions on Programming Languages and Systems (Oct 1979) 1/2, 266–286zbMATHCrossRefGoogle Scholar
  10. 10.
    Andrej Brodnik and Svante Carlsson and Erik D. Demaine and J. Ian Munro and Robert Sedgewick: Resizable Arrays in Optimal Time and Space. Workshop on Algorithms and Data Structures (1999) 37–48Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Phil Bagwell

There are no affiliations available

Personalised recommendations