Advertisement

The implementation and efficiency of arrays in clean 1.1

  • John H. G. van Groningen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1268)

Abstract

We present a new approach to implementing arrays in a pure lazy functional programming language. The arrays can be updated destructively by using uniqueness typing, and the elements can be unboxed. We describe the implementation of these arrays in the functional programming language Clean 1.1. The performance of two sorting algorithms and a fast fourier transformation written in Clean using arrays is compared with similar programs written in C. The current implementation of Clean is on average about 25 percent slower than C for these programs.

Keywords

Array Element Functional Language Select Function Garbage Collector Array Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [AnHu90]
    Andersen, S. and P. Hudak. 1990. Compilation of Haskell Array Comprehensions for Scientific Computing. In Proc. of the ACM SIGPLAN'90 Conf. on Programming Language Design and Implementation, New York, pp. 137–149.Google Scholar
  2. [BaSm93]
    Barendsen E., and J.E.W. Smetsers. 1993. Conventional and Uniqueness Typing in Graph Rewrite Systems. In proceedings 13th conference Foundations of Software Technology and Theoretical Computer Science, Bombay, India, December 1993, pp. 41–51, LNCS 761.Google Scholar
  3. [Feo92]
    Feo, J. A Comparative Study of Parallel Programming Languages: The Salishan Problems. 1992. North Holland, ISBN 0-444-88135-2.Google Scholar
  4. [FiO195]
    Fitzgerald, S.M. and R.R. Oldehoeft. 1995. Update-in-place Analysis for rue Multidimensional Arrays. High Performance Functional Computing, pp. 105–118.Google Scholar
  5. [Jone95]
    Jones, M.P. 1995. A system of constructor classes: overloading and implicit higher-order polymorphism. In Journal of Functional Programming 5(1) — January 1995, Cambridge University Press, pp. 1–35.Google Scholar
  6. [NöSm93]
    Nöcker, E.G.J.M.H., and J.E.W. Smetsers. 1993. Partially strict nonrecursive data types. In Journal of Functional Programming 3(2), pp. 191–215.Google Scholar
  7. [Lero92]
    Leroy X. 1992. Unboxed objects and polymorphic typing. Proc. 19th Symp. Principles of Programming Languages, pp. 177–188.Google Scholar
  8. [MuKlSc96]
    Mullin, L.R., W.E. Kluge and S. Scholz. 1996. On Programming Scientific Applications in SAC — a Functional Language Extended by a Subsystem for High-Level Array Operations. Proc. of the 8th International Workshop on Implementation of Functional Languages.Google Scholar
  9. [PeLa91]
    Peyton Jones, S.L. and J. Launchbury. 1991. Unboxed values as first class citizens in a non-strict functional language. In Proc. of Conference on Functional Programming Languages and Computer Architecture (FPCA `91), Sept. 1991, Cambridge, LNCS 523.Google Scholar
  10. [PeWa92]
    Peyton Jones, S.L. and P. Wadler. 1992. Imperative functional programming. ACM Symposium on Principles of Programming Languages (POPL), pp.71–84.Google Scholar
  11. [PlaEe95]
    Plasmeijer, M.J., and M.C.J.D. van Eekelen. 1995. Clean 1.1 Reference Manual. Technical Report. University of Nijmegen, The Netherlands.Google Scholar
  12. [Serr96]
    Serrarens, P.R. A Clean Conjugate Gradient Algorithm. 1996. Proc. of the 8th International Workshop on Implementation of Functional Languages..Google Scholar
  13. [SNGP91]
    Smetsers, J.E.W., E.G.J.M.H. Nöcker, J.H.G. van Groningen and M.J. Plasmeijer. 1991. Generating Efficient Code for Lazy Functional Languages, In Proc. of Conference on Functional Programming Languages and Computer Architecture (FPCA '91), Cambridge, MA, USA, Springer-Verlag, LNCS 523, pp. 592–617.Google Scholar
  14. [Wadl86]
    Wadler. P. 1986. A new array operation for functional languages. In Proc. Graph Reduction Workshop, Santa Fe, Springer Verlag, LNCS 295.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • John H. G. van Groningen
    • 1
  1. 1.Computing Science InstituteUniversity of NijmegenNijmegenNetherlands

Personalised recommendations