Partially strict non-recursive data types
Eric Nöcker, Sjaak Smetsers · Journal of Functional Programming · 1993
Abstract Values belonging to lazy data types have the advantage that sub-components can be accessed without evaluating the values as a whole: unneeded components remain unevaluated. A disadvantage is that often a large amount of space and time is required to handle lazy data types properly. Many special constructor cells are needed to ‘glue’ the individual parts of a composite object together and to store it in the heap. We present a way of representing data in functional languages which makes these special constructor cells superfluous. In some cases, no heap at all is needed to store this data. To make this possible, we introduce a new kind of data type: ( partially) strict non-recursive data types . The main advantage of these types is that an efficient call-by-value mechanism can be used to pass arguments. A restrictive subclass of (partially) strict non-recursive data types, partially strict tuples , is treated more comprehensively. We also give examples of important classes of applications. In particular, we show how partially strict tuples can be used to define very efficient input and output primitives. Measurements of applications written in Concurrent Clean which exploit partially strict tuples have shown that speedups of 2 to 3 times are reasonable. Moreover, much less heap space is required when partially strict tuples are used.
Cited by 6 works. doi:10.1017/s0956796800000691 Open-access PDF
Authors
References
- An Algorithm for the Machine Calculation of Complex Fourier Series
- Miranda: A non-strict functional language with polymorphic types
- Unboxed values as first class citizens in a non-strict functional language
- Projections for strictness analysis
- Unboxed values as first class citizens
- Concurrent clean
- Generating efficient code for lazy functional languages
- Evaluation transformers — A model for the parallel evaluation of functional languages (extended abstract)