Content area
Abstract
Combining different programs or code fragments is a natural way to build larger programs. This allows programmers to better separate a complex problem into simple parts. Furthermore, by writing programs in a modular way, we increase code reusability
However, these simple parts need to be connected somehow. These connections are done via intermediate structures that communicate results between the different components, harming performance because of the overhead introduced by the allocation and deallocation of multiple structures
Fusion, a very commonly used technique in functional programming, aims to remove the creation of these unnecessary structures, as they don’t take part in the final result
With the introduction of streams and lambda expressions, Java made its way into a more functional programming style. Yet, these mechanisms lack optimization and the adaptation of fusion techniques used by some compilers for functional languages could benefit the performance of Java streams
In this thesis, we study how functional fusion can be adapted to Java Streams.





