A “linear logic” Quicksort

  • Authors:
  • Henry G. Baker

  • Affiliations:
  • Nimble Computer Corporation. 16231 Meadow Ridge Way, Encino, CA

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

The linear style of programming inspired by linear logic has been proposed to reduce garbage collection and synchronization costs in serial and parallel systems. We programmed Quicksort for both lists and arrays in a "linear" fragment of Lisp to estimate the performance impact of linearity on a serial machine. Even though Quicksort is well-tuned for current non-linear architectures, we find that linearity extracts no real penalty. Our "linear" list Quicksort is as fast as any non-linear list Quicksort, and our "linear" vector Quicksort is only 3.5% slower than a non-linear vector Quicksort. The linear style is moderately pleasant, and the redundancy of linearity checking can aid in finding bugs.