We describe the design, implementation and use of a new kind of profiling tool that yields valuable information about the memory use of lazy functional programs. The tool has two parts: a modified functional language implementation which generates profiling information during the execution of programs, and a separate program which converts this information to graphical form. With the aid of profile graphs, one can make alterations to a functional program which dramatically reduce its space consumption. We demonstrate this in the case of a genuine example -the first to which the tool was applied -for which the results are strikingly successful.
Capsule reviewProfiling technology for lazy functional programs is long overdue. Runciman and Wakeling have produced a practical and useful tool, notably because it works in the context of a fullyfledged compiler. Their work highlights the lack of information we have about the dynamic behaviour of lazy functional programs and the potential performance improvements which may be possible given profiling tools to provide us with it. This paper opens up new areas of practical research designing and building such tools.Runciman and Wakeling have started this work with the design and implementation of a heap profiling tool. They place considerable emphasis on the design of an appropriate graphical presentation of the large quantity of profiling data produced. It is interesting that they profile space and not time; ideally one would like both. An upper bound on execution time improvements from improving space behaviour is the garbage collection and paging time. However, they found that the task of fixing space bugs does sometimes lead to beneficial algorithmic changes too.We await with interest the continued development of practical profiling tools for lazy functional programs.
The functional programming community has shown some interest in spreadsheets, but surprisingly no one seems to have considered making a standard spreadsheet, such as Excel, work with a standard functional programming language, such as Haskell. In this paper, we show one way that this can be done. Our hope is that by doing so, we might get spreadsheet programmers to give functional programming a try.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.