Hostname: page-component-6766d58669-l4t7p Total loading time: 0 Render date: 2026-05-20T13:42:40.579Z Has data issue: false hasContentIssue false

Factorising folds for faster functions

Published online by Cambridge University Press:  30 June 2010

GRAHAM HUTTON
Affiliation:
University of Nottingham, Nottingham, UK (e-mail: gmh@cs.nott.ac.uk)
MAURO JASKELIOFF
Affiliation:
Universidad Nacional de Rosario, Rosario, Argentina (e-mail: mauro@fceia.unr.edu.ar)
ANDY GILL
Affiliation:
University of Kansas, Lawrence, KS, USA (e-mail: andygill@ku.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

The worker/wrapper transformation is a general technique for improving the performance of recursive programs by changing their types. The previous formalisation (A. Gill & G. Hutton, J. Funct. Program., vol. 19, 2009, pp. 227–251) was based upon a simple fixed-point semantics of recursion. In this paper, we develop a more structured approach, based upon initial-algebra semantics. In particular, we show how the worker/wrapper transformation can be applied to programs defined using the structured pattern of recursion captured by fold operators, and illustrate our new technique with a number of examples.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2010
Submit a response

Discussions

No Discussions have been published for this article.