Hong Kong University of Science and Technology
Smart Inlining: Splitting the Difference for Functional Program Optimization
Abstract
dc:description<p>We propose a novel approach to perform smart inlining without requiring any prior statis-tics on program runtime characteristics. This method abandons the traditional all-or-nothing inlining principle, allowing for the selective inlining of function parts while maintaining code sharing and improving performance. To achieve this, we use a technique called function split-ting, which divides functions into reusable and independent components. This enables us to operate on each component independently, thus avoiding the need to inline the entire function. We implement our approach in hkmc2, a compiler for the MLscript language. We evaluate our approach using benchmarks from the Lean4, Koka, and Nofib benchmark suites. This evalua-tion shows performance improvements on benchmarks with existing optimizable code patterns. However, we also observed performance regressions on specific benchmarks, indicating room for improvement in our implementation.</p>
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Yang, Ruqing
- Contributors dc:contributor
-
- Parreaux, Lionel
Rights
- Language dc:language
- English
Identifiers
dc:identifier.*- Repository record dc:identifier
- http://repository.hkust.edu.hk/ir/Record/1783.1-152676