2 research outputs found

    Improving mergesort for linked lists

    No full text
    We present a highly tuned mergesort algorithm that improves the cost bounds when used to sort linked lists of elements. We provide empirical comparisons of our algorithm with other mergesort algorithms. The paper also illustrates the sort of techniques that allow to speed a divide-and-conquer algorithm

    Improving Mergesort for Linked Lists

    No full text
    We present a highly tuned mergesort algorithm that improves the cost bounds when used to sort linked lists of elements. We provide empirical comparisons of our algorithm with other mergesort algorithms. The paper also illustrates the sort of techniques that allow to speed a divide-andconquer algorithm. 1 Introduction The main goal of this paper is to improve the asymptotic average-case cost Mn of mergesort under the usual assumption that the list to be sorted includes a random permutation of n different keys. Recall that mergesort is the default algorithm to sort a linked list of keys. The meaning of "cost" above depends on the quantities of interest. For instance, for most of the versions of mergesort that we present in this paper, measuring Mn as the number of key comparisons yields Mn = n log 2 n+o(n log n), which is optimal w.r.t. the leading term of the number of comparisons. However, as we shall see hereafter, we may also consider other operations, like reading keys from memory..
    corecore