This document compares the sorting algorithms mergesort and quicksort. While mergesort has better worst-case time complexity of O(n log n), quicksort is generally considered better due to its improved average-case performance, lower auxiliary space requirements, and better locality of reference. Quicksort is an in-place sorting algorithm, while mergesort requires additional storage space. Quicksort also exhibits better cache locality and performance on smaller data sets, though mergesort is more suitable for large linked lists or data stored on slow external storage.