Abstract

In functional programming it is common to write programs as compositions of other simpler functions. This makes it possible to take advantage of the well-known benefits of modular programming. However, in many cases, the resulting programs have efficiency problems caused by the generation of data structures that are solely used for communication between the functions that take part in the compositions. Many of those intermediate structures can be eliminated by an appropriate combination of the codes of the involved functions using a technique called program fusion. In this work, we propose a program fusion technique for accumulations, which are recursive functions that use additional parameters, called accumulators, for keeping intermediate results. Accumulations are known to be difficult to be fused because of the presence of the accumulators and the fact that results are usually computed in those parameters. Our technique is based on a shortcut fusion approach which turns out to be effective in the case of accumulations. We present benchmarks that illustrate the impact of shortcut fusion on accumulations.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.