Results 1  10
of
20
A Logical Analysis of Aliasing in Imperative HigherOrder Functions
 INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, ICFP’05
, 2005
"... We present a compositional program logic for callbyvalue imperative higherorder functions with general forms of aliasing, which can arise from the use of reference names as function parameters, return values, content of references and part of data structures. The program logic ..."
Abstract

Cited by 33 (4 self)
 Add to MetaCart
We present a compositional program logic for callbyvalue imperative higherorder functions with general forms of aliasing, which can arise from the use of reference names as function parameters, return values, content of references and part of data structures. The program logic
On the adaptiveness of quicksort
 IN: WORKSHOP ON ALGORITHM ENGINEERING & EXPERIMENTS, SIAM
, 2005
"... Quicksort was first introduced in 1961 by Hoare. Many variants have been developed, the best of which are among the fastest generic sorting algorithms available, as testified by the choice of Quicksort as the default sorting algorithm in most programming libraries. Some sorting algorithms are adapti ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
(Show Context)
Quicksort was first introduced in 1961 by Hoare. Many variants have been developed, the best of which are among the fastest generic sorting algorithms available, as testified by the choice of Quicksort as the default sorting algorithm in most programming libraries. Some sorting algorithms are adaptive, i.e. they have a complexity analysis which is better for inputs which are nearly sorted, according to some specified measure of presortedness. Quicksort is not among these, as it uses Ω(n log n) comparisons even when the input is already sorted. However, in this paper we demonstrate empirically that the actual running time of Quicksort is adaptive with respect to the presortedness measure Inv. Differences close to a factor of two are observed between instances with low and high Inv value. We then show that for the randomized version of Quicksort, the number of element swaps performed is provably adaptive with respect to the measure Inv. More precisely, we prove that randomized Quicksort performs expected O(n(1+log(1+ Inv/n))) element swaps, where Inv denotes the number of inversions in the input sequence. This result provides a theoretical explanation for the observed behavior, and gives new insights on the behavior of the Quicksort algorithm. We also give some empirical results on the adaptive behavior of Heapsort and Mergesort.
Average case analysis of java 7’s dual pivot quicksort
 In Proc. of 20th European Symposium on Algorithms (ESA
, 2012
"... Abstract. Recently, a new Quicksort variant due to Yaroslavskiy was chosen as standard sorting method for Oracle’s Java 7 runtime library. The decision for the change was based on empirical studies showing that on average, the new algorithm is faster than the formerly used classic Quicksort. Surpris ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
Abstract. Recently, a new Quicksort variant due to Yaroslavskiy was chosen as standard sorting method for Oracle’s Java 7 runtime library. The decision for the change was based on empirical studies showing that on average, the new algorithm is faster than the formerly used classic Quicksort. Surprisingly, the improvement was achieved by using a dual pivot approach, an idea that was considered not promising by several theoretical studies in the past. In this paper, we identify the reason for this unexpected success. Moreover, we present the first precise average case analysis of the new algorithm showing e. g. that a random permutation of length n is sorted using 1.9n lnn − 2.46n+O(lnn) key comparisons and 0.6n lnn+ 0.08n+O(lnn) swaps. 1.
Generic Discrimination  Sorting and Partitioning Unshared Data in Linear Time
, 2008
"... We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that worstcase lineartime discrimination functions (discriminators) can be defined generically, by (co)induction on an expressive language of order denotations. The generic definition yields di ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
(Show Context)
We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that worstcase lineartime discrimination functions (discriminators) can be defined generically, by (co)induction on an expressive language of order denotations. The generic definition yields discriminators that generalize both distributive sorting and multiset discrimination. The generic discriminator can be coded compactly using list comprehensions, with order denotations specified using Generalized Algebraic Data Types (GADTs). A GADTfree combinator formulation of discriminators is also given. We give some examples of the uses of discriminators, including a new mostsignificantdigit lexicographic sorting algorithm. Discriminators generalize binary comparison functions: They operate on n arguments at a time, but do not expose more information than the underlying equivalence, respectively ordering relation on the arguments. We argue that primitive types with equality (such as references in ML) and ordered types (such as the machine integer type), should expose their equality, respectively standard ordering relation, as discriminators: Having only a binary equality test on a type requires Θ(n 2) time to find all the occurrences of an element in a list of length n, for each element in the list, even if the equality test takes only constant time. A discriminator accomplishes this in linear time. Likewise, having only a (constanttime) comparison function requires Θ(n log n) time to sort a list of n elements. A discriminator can do this in linear time.
Generic topdown discrimination
, 2009
"... We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that discriminators (discrimination functions) can be defined generically, by structural recursion on order and equivalence expressions denoting a rich class of total preorders and equivalence rel ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
(Show Context)
We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that discriminators (discrimination functions) can be defined generically, by structural recursion on order and equivalence expressions denoting a rich class of total preorders and equivalence relations, respectively. Discriminators improve the asymptotic performance of generic comparisonbased sorting and partitioning, yet do not expose more information than the underlying ordering relation, respectively equivalence. For a large class of order and equivalence expressions, including all standard orders for firstorder recursive types, the discriminators execute in worstcase linear time. The generic discriminators can be coded compactly using list comprehensions, with order expressions specified using Generalized Algebraic Data Types (GADTs). We give some examples of the uses of discriminators, including a new mostsignificantdigit lexicographic sorting algorithm and type isomorphism with an associativecommutative operator. Full source code of discriminators and their applications is included. 1 We argue discriminators should be basic operations for primitive and abstract types with equality. The basic multiset discriminator for references, originally due to Paige et al., is shown to be both efficient and fully abstract: it finds all duplicates of all references occurring in a list in linear time without leaking information about their representation. In particular, it behaves deterministically in the presence of garbage collection and nondeterministic heap allocation even when references are represented as raw machine addresses. In contrast, having only a binary equality test as in ML requires Θ(n 2) time, and allowing hashing for performance reasons as in Java, makes execution nondeterministic and complicates garbage collection.
Selection in the presence of memory faults, with applications to inplace resilient sorting
 In Proc. 23rd ISAAC, volume 7676 of LNCS
, 2012
"... ar ..."
A Portable Cache Profiler Based on SourceLevel Instrumentation,” tech. rep
, 2003
"... 1.2 Algorithms Should Be CacheConscious......................... 2 ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
1.2 Algorithms Should Be CacheConscious......................... 2
Generic Discrimination: Partitioning and Sorting of Complex Data in Linear Time
"... Abstract. We introduce the notion of discrimination, which is a generalized form of partitioning, and present an expressive term language for defining equivalence relations on complex data. The language allows definition of equivalence relations by freely combining structural equivalence, equivalenc ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
Abstract. We introduce the notion of discrimination, which is a generalized form of partitioning, and present an expressive term language for defining equivalence relations on complex data. The language allows definition of equivalence relations by freely combining structural equivalence, equivalence of lists under commutativity, idempotence (bag and set equivalence), and more. We then show that worstcase lineartime discriminators can be defined generically, by induction on the term language, using multiset discrimination. By employing discriminators for base types such as characters and integer segments that sort their inputs, it can be shown that the inductive construction yields discriminators that both partition and sort their input in linear time for a wide range of total preorders. This amounts to generically bootstrapping pigeonhole sorting for a finite segment of primitive data to lineartime sorting of complex data. We show how these discriminators, both sorting and nonsorting, can be coded up compactly and elegantly using Generalized Algebraic Data Types (GADTs) and list comprehensions and give some examples of applications of the use of discriminators. Finally, we argue that discrimination should replace equality testing as a language primitive for builtin types and abstract types that wish to only make equality observable: they algorithmically generalize equality testing, which is basically just discrimination of 2 elements. Discriminators allow partitioning and even sorting of arbitrary size lists in linear time without comparison operations (as in comparisonbased sorting) or arithmetization of the values (as for hashbased methods). Thus even references in ML could be discriminated in linear time instead of quadratic time, if discrimination were the builtin operation for exposing reference equality, not equality testing.
Striving for Efficiency in Algorithms: Sorting
"... Sorting is the fundamental algorithmic problem in computer science. It is the first step in solving many other algorithmic problems. Donald Knuth, a world famous computer scientist and author of the book “The Art of Computer Programming, Volume 3: Sorting and Searching ” ([6]), wrote: “I believe tha ..."
Abstract
 Add to MetaCart
(Show Context)
Sorting is the fundamental algorithmic problem in computer science. It is the first step in solving many other algorithmic problems. Donald Knuth, a world famous computer scientist and author of the book “The Art of Computer Programming, Volume 3: Sorting and Searching ” ([6]), wrote: “I believe that virtually every important aspect of programming arises somewhere in the context of searching or sorting”. Quicksort is a comparison sorting algorithm that, on average, makes O(n log n) comparisons to sort n items. This is as efficient as a comparison sorting algorithm can be ([1]). Quicksort is often faster in practice than other O(n log n) sorting algorithms and it has another advantage it sorts in place, that is, the items are rearranged within the array, so it does not require a lot of additional space ([1]). Quicksort was invented by a British computer scientist, C.A.R. Hoare, in 1960. Sir Charles Antony Richard Hoare describes how he invented Quicksort in his interview published in [10]. After graduating from the University of Oxford in 1956, Hoare did his national service in the Royal Navy studying Russian. In 1958 he took a course in Mercury Autocode, which was the programming language used on a computer in Oxford University. Later, he was a visiting student at Moscow