Skip Navigation

The Computer Journal 1987 30(4):362-371; doi:10.1093/comjnl/30.4.362
© 1987 by British Computer Society
This Article
Right arrow Full Text (PDF)
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Email this article to a friend
Right arrow Similar articles in this journal
Right arrow Similar articles in ISI Web of Science
Right arrow Alert me to new issues of the journal
Right arrow Add to My Personal Archive
Right arrow Download to citation manager
Right arrow Search for citing articles in:
ISI Web of Science (2)
Right arrowRequest Permissions
Google Scholar
Right arrow Articles by Verkamo, A. I.
Right arrow Search for Related Content
Social Bookmarking
 Add to CiteULike   Add to Connotea   Add to Del.icio.us  
What's this?

Performance of Quicksort Adapted for Virtual Memory Use

A. I. Verkamo *

Department of Computer Science, University of Helsinki, Tukholmankatu 2, SF-00250 Helsinki, Finland

Several variants of quicksort are compared in order to find an efficient internal sorting algorithm for sorting large files in a virtual memory environment. The algorithms compared are original quicksort; ‘Esort’, which uses a fixed memory partition of two page frames; ‘Wsort’, which combines quicksort with merging and sorts one page at a time to reduce page fetches; and ‘Psort’, which uses manual replacement of pages guided by estimates of the interval to the next reference. The comparison is based on several sorting runs on different-size random-ordered files. A memory management simulator with fetch on demand and working set replacement strategy is used to achieve performance measures: the total execution time, the main memory space allocation, and the main memory space-time integral.

Quicksort achieves its best performance with a relatively small page size and a very small window size. Reducing page faults by increasing the window size results in excessive space allocation. In an optimal environment, Psort gives some 30-40% smaller space-time integral than quicksort. The space allocation sizes are close to each other, but Psort needs less that half of the page fetches of quicksort. The results for Esort are close to those of quicksort. Wsort does not compete favourably with the original quicksort. In a typical virtual memory environment with a large page size and a large window size, both Esort and Psort perform remarkably better than original quicksort. The space-time integral difference of Psort and quicksort is over 50%, and it increases with an increasing file size.


Received January 1986. revised March 1986.

* Department of Computer Science, University of Helsinki, Tukholmankatu 2, SF-00250 Helsinki, Finland


Add to CiteULike CiteULike   Add to Connotea Connotea   Add to Del.icio.us Del.icio.us    What's this?




Disclaimer:
Please note that abstracts for content published before 1996 were created through digital scanning and may therefore not exactly replicate the text of the original print issues. All efforts have been made to ensure accuracy, but the Publisher will not be held responsible for any remaining inaccuracies. If you require any further clarification, please contact our Customer Services Department.