| Chris Okasaki. Purely functional random-access lists. In Proceedings of the 7th International Conference on Functional Programming Languages and Computer Architecture (FPCA), pages 86-- 95. ACM Press, June 1995. |
....required and the arrays are used in a nonsingle threaded manner or when the size of the arrays varies dynamically. A variety of implementations is available. Braun trees [11] for instance, support all operations in Q(log n) time. An unrivalled data structure is the skew binary random access list [15, 16], which provides logarithmic array operations and constant time list operations. A common characteristic of the tree based implementations is the logarithmic time bound for the look up operation. By contrast, pure functional arrays as to be found in the Haskell standard library [19] support ....
....n (f x) The details of the modification are left to the reader. 6 Benchmarks This section presents preliminary measurements comparing various instances of multiway trees to Haskell 98 arrays, Int indexed arrays (starting at zero) lists, Braun trees [11] and skew binary randomaccess lists [15, 16]. The programs were compiled with Version 5.04 of the Glasgow Haskell Compiler ( O2) the executables were run on a Pentium III (645 MHz) with 192 MB of main memory. All multiway tree implementations are bootstrapped from Int indexed arrays using Haskell s type class mechanism. Despite appearance, ....
[Article contains additional citation context not shown here]
Chris Okasaki. Purely functional random-access lists. In Proceedings of the Seventh International Conference on Functional Programming Languages and Computer Architecture (FPCA'95), pages 86--95, La Jolla, California, June 1995. ACM SIGPLAN/SIGARCH and IFIP WG2.8, ACM Press.
....Benchmarking of Functional Data Structures Graeme E. Moss and Colin Runciman c fl Springer Verlag Department of Computer Science, University of York, UK fgem,coling cs.york.ac.uk Abstract. Despite a lot of recent interest in purely functional data structures, for example [Ada93, Oka95, BO96, Oka96, OB97, Erw97], few have been benchmarked. Of these, even fewer have their performance qualified by how they are used. But how a data structure is used can significantly affect performance. This paper makes three original contributions. 1) We present an algorithm for generating a benchmark according to a ....
....(3) We use the results of this benchmarking to present a decision tree for the choice of random access list implementation, according to how the list will be used. 1 Motivation Recent years have seen renewed interest in purely functional data structures: sets [Ada93] random access lists [Oka95], priority queues [BO96] arrays [OB97] graphs [Erw97] and so on. But, empirical performance receives little attention, and is usually based on a few hand picked benchmarks. Furthermore, the performance of a data structure usually varies according to how it is used, yet this is mostly ....
[Article contains additional citation context not shown here]
Chris Okasaki. Purely functional random-access lists. In Conference Record of FPCA '95, pages 86--95. ACM Press, June 1995.
....much prettier than the original version. This has been amply demonstrated in the past for various kinds of balanced binary search trees, including 2 3 trees [47] BBtrees [2] and AVL trees [31] Over the past six or seven years, many papers have given details of new functional data structures [7, 10, 14, 32, 33, 34, 40]. However, these papers only give limited attention to empirical performance. Okasaki writes in an open problems section of his thesis Purely Functional Data Structures [36] The theory and practice of benchmarking [functional] data structures is still in its infancy. This thesis develops the ....
.... [2, 31] Braun Trees head : O(1) cons tail : O(log n) lookup update: O(log i) snoc last init : O(log n) 21] Slowdown Deques cons head tail : O(1) lookup update: O(log d) snoc last init : O(1) 24] Skew Binary Lists cons head tail : O(1) lookup update: O(min(i; log n) [33] Elevator Lists cons head tail : O(1) lookup update : O(i) n a Table 2.2: Complexities of implementations of sequences supporting randomaccess, where n is the length of the sequence, i is the index being accessed by a lookup or update operation, and d is the distance from the index to the ....
[Article contains additional citation context not shown here]
Chris Okasaki. Purely functional random-access lists. In Conference Record of FPCA '95, pages 86--95. ACM Press, June 1995. (pp 5, 18, 21, 102, 187)
....is uniquely determined by the binary decomposition of its size. A sequence of size (1011) 2 , for instance, is represented by the term One b 0 (Zero (One b 2 (One b 3 Nil) where b i is of type Fork i Leaf a. Now, since random access lists based on the 0 1 system are discussed at length in (Okasaki, 1998, Sec. 9.2.1 and 10.1.2) we will implement a zeroless representation based on the 1 2 system instead. The lessons we are going to learn will prove useful when we tackle the implementation of 2 3 finger search trees in Sec. 7 and 8. Recall that binary numeric representations are based on the idea that the digit d ....
Okasaki, Chris. (1995b). Purely functional random-access lists. Pages 86--95 of: Proceedings of the seventh international conference on functional programming languages and computer architecture (FPCA'95). La Jolla, California: ACM Press, for ACM SIGPLAN /SIGARCH and IFIP WG2.8.
....the results are compared to some deterministic selection algorithms. 1 Introduction How to design and implement efficient aggregate data structures has been a major concern for both the designers and users of functional programming languages. See, for example, Chuang and Goldberg [2, 3] Okasaki [9], Schoenmakers [11] and Shao, Reppy, and Appel [13, 14] The problem becomes more complicated if access patterns to aggregates are highly variant, or even unpredictable. A common situation occurs where there are several representations of an aggregate, with one representation being more efficient ....
....examples of this kind of characteristics abound in functional programming. For example, Chuang [2] discusses the performance tradeoff between two representations of arrays (one good for update operations and one good for read operations) and how to make probabilistic choices on line. Okasaki [9] presents an implementation of random access lists that is good for both list and array operations. Performance of the list operations of the random access lists, however, are not as good as those of the straightforward list representation; so is the case for the array operations. Users of ....
Chris Okasaki. Purely functional random--access lists. In SIGPLAN--SIGARCH--WG2.8 Conference on Functional Programming Languages and Computer Architecture, pages 86--95. La Jolla, California, USA, ACM Press, June 1995.
....in [Hoo92a] The other with leaf trees, as described by Dielissen and Kaldewaij in [DK95] We consider the front element of an array of length n to be at index 0, and the rear one at index n Gamma 1. Another interesting data structure that supports efficient indexing for sequences is described in [Oka95a], where a random access list is implemented as a forest of complete pre ordered nodeoriented trees. We do not include this data structure here since it does not support an efficient snoc. 6.1 Arrays as Braun trees Braun trees and its use to represent flexible arrays are presented in [Hoo92a] ....
....in a leaf tree may be more expensive but still of logarithmic complexity than in a Braun tree, leaf trees are more suitable to other operations not used here, such as manipulations of segments of the array. They also seem to perform better when the elements are accessed in sequential order [Oka95a]. Most of the operations needed on leaf trees are described in section 3.1. However, operations to insert an element are not described there, since they determine the shape of the tree and therefore its height. Since our implementation of leaf trees does not consider empty trees, we represent a ....
[Article contains additional citation context not shown here]
Chris Okasaki. Purely Functional Random-Access Lists. In Functional Programming Languages and Computer Architecture, pages 86--95. ACM Press, June 1995.
....that they can be implemented in a purely functional language they automatically become confluently persistent [85] Such data structures have been denoted purely functional data structures. Some recently developed purely functional data structures are: queues and deques [84] random access lists [83], catenable lists [67] priority queues [22] and catenable finger search trees [68] A survey on the design of functional data structures can be found in the thesis of Okasaki [85] It remains an interesting open problem if there exists a construction which can remove the amortization from the ....
....performing Extend. where r k = r k Gamma1 = 2 and r k Gamma2 = 4. Note that the only restructuring required is to make e an incoming edge of the new node w. The described approach for relinking has recently been applied in a different context to construct purely functional random access lists [83]. In [83] it is proved that a sequence of trees satisfying (8.1) is unique for a given number of nodes. 8.3.2 A work efficient implementation In the following we let the output queue of processor P i be denoted Q out(i) Compared to the sequential pipeline, processor P i now only outputs a ....
[Article contains additional citation context not shown here]
Chris Okasaki. Purely functional random-access lists. In Functional Programming Languages and Computer Architecutre, pages 86--95, 1995.
....case where r k = r k Gamma1 = 2 and r k Gamma2 = 4. Note that the only restructuring of the pipeline required is to make the edge e an incoming edge of the new node w. The described approach for relinking has been applied in a different context to construct purely functional random access lists [23]. In [23] it is proved that a sequence of trees j x j j oe Delta Delta j y j j oe Delta Delta j z j j j j oe Delta Delta j j j oe Delta Delta oe Gamma Gamma j j j j oe Delta Delta j j j oe Delta Delta oe Gamma Gamma oe Phi Phi Phi Phi e oe oe oe j w j x ....
....r k = r k Gamma1 = 2 and r k Gamma2 = 4. Note that the only restructuring of the pipeline required is to make the edge e an incoming edge of the new node w. The described approach for relinking has been applied in a different context to construct purely functional random access lists [23] In [23] it is proved that a sequence of trees j x j j oe Delta Delta j y j j oe Delta Delta j z j j j j oe Delta Delta j j j oe Delta Delta oe Gamma Gamma j j j j oe Delta Delta j j j oe Delta Delta oe Gamma Gamma oe Phi Phi Phi Phi e oe oe oe j w j x j j oe ....
Chris Okasaki. Purely functional random-access lists. In Functional Programming Languages and Computer Architecture, pages 86--95, 1995.
....method needs more examination. 6 Related Work We wrote a paper [MR97] benchmarking queues using the basic profile of Section 3 with the build and fall method of Section 5.1. Most papers presenting functional data structures omit thorough benchmarking results. Notable exceptions include Okasaki [Oka95] and O Neill [OB97] Our work will eventually appear in [Mos99] We know of no other general examination of the benchmarking of functional data structures. 7 Conclusions The basic quantification of datatype usage given in Section 3 is intuitive and useful. However it may not capture adequately an ....
Chris Okasaki. Purely functional random-access lists. In Conference Record of FPCA '95, pages 86--95. ACM Press, June 1995.
....= 2 and r p Gamma2 = 4. Note that the only restructuring of the pipeline required is to make the edge e an incoming edge of the new node associated with processor P i . The described approach for relinking has been applied in a different context to construct purely functional random access lists [24]. In [24] it is proved that a sequence of trees satisfying (1) is unique for a given number of nodes. 5.2 Queues and forbidden sets We now give the details of how to handle the output queues and the forbidden sets and how to implement the MERGESTEP operation. Let P j be a processor connected to ....
....r p Gamma2 = 4. Note that the only restructuring of the pipeline required is to make the edge e an incoming edge of the new node associated with processor P i . The described approach for relinking has been applied in a different context to construct purely functional random access lists [24] In [24] it is proved that a sequence of trees satisfying (1) is unique for a given number of nodes. 5.2 Queues and forbidden sets We now give the details of how to handle the output queues and the forbidden sets and how to implement the MERGESTEP operation. Let P j be a processor connected to a ....
C. Okasaki. Purely functional random-access lists. In Functional Programming Languages and Computer Architecture, pages 86--95, 1995.
....of a deque the front end and the rear end. Elements are put into and taken away at the front end by the push and pop operations. Elements are put into and taken away at the rear end by the inject and enject operations. There are many efficient implementations of functional deques [7] 15] [19] [22] In particular, there are representation where each of the four functional deque operations costs only constant worst case time [7] 19] 22] We call such representation real time. Real time representation of a deque usually has higher overhead associated with each deque operation. If a ....
....are put into and taken away at the rear end by the inject and enject operations. There are many efficient implementations of functional deques [7] 15] 19] 22] In particular, there are representation where each of the four functional deque operations costs only constant worst case time [7] [19] [22] We call such representation real time. Real time representation of a deque usually has higher overhead associated with each deque operation. If a deque is mostly used like a stack, then a stack representation may suffice. In this representation, push and pop operations each takes constant ....
Chris Okasaki. Purely functional random--access lists. In SIGPLAN--SIGARCH--WG2.8 Conference on Functional Programming Languages and Computer Architecture, pages 86--95. La Jolla, California, USA, ACM Press, June 1995.
.... that any actually implementation of the language has to choose between list like performance and array like performance, i.e. accepting O(n) cost for either the prefixing or the indexing operation, or must employ some other data structure (e.g. the purely functional random access lists of Okasaki [20]) with at best O(log n) for indexing 3 . The generic sequence interface presented in this report allows but does not require that a sequence be capable of extension, and this makes it possible to use it as an interface to both lists and arrays. Larch [14] is a formal specification system for ....
Chris Okasaki. Purely functional random-access lists. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pages 86--95, 1995.
....1 Figure 3 summarizes all the methods on sequences. Sequences are currently the most populated abstraction in Edison. There are six basic implementations of sequences, including ordinary lists, join lists, simple queues [1] banker s queues [9] random access stacks [6] random access lists [7], Braun trees [4, 8] and binary random access lists [9] plus two sequence adaptors, which are representations of sequences parameterized by other representations of sequences. One adds an explicit size eld to an existing implementation of sequences and the other reverses the orientation of an ....
Chris Okasaki. Purely functional random-access lists. In Conference on Functional Programming Languages and Computer Architecture, pages 86-95, June 1995.
....using ML style functors. The last transformation, data structural bootstrapping, is an interesting application of higher order functors and recursive structures. After describing a few possible optimizations, we conclude with brief discussions of related work and future work. 4 Brodal and Okasaki Rank 0 s Rank 1 s s Rank 2 s s s s Rank 3 s s s s , s s s s Figure 2: Binomial trees of ranks 0 3. All source code is presented in Standard ML (Milner et al. 1990) and is available through the World Wide Web from http: foxnet.cs.cmu.edu people cokasaki priority.html 2 Binomial ....
Okasaki, C. (1995b) Purely functional random-access lists. Conference on Functional Programming Languages and Computer Architecture pp. 86--95.
No context found.
Chris Okasaki. Purely functional random-access lists. In Proceedings of the 7th International Conference on Functional Programming Languages and Computer Architecture (FPCA), pages 86-- 95. ACM Press, June 1995.
No context found.
Chris Okasaki. Purely functional random-access lists. In Proceedings of the seventh international conference on Functional programming languages and computer architecture, pages 86--95. ACM Press, 1995.
No context found.
Chris Okasaki. Purely functional random-access lists. In Proceedings of the 7th International Conference on Functional Programming Languages and Computer Architecture (FPCA), pages 86-- 95. ACM Press, June 1995.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC