Abstract
Pattern matching is a high-level notation for programs to analyse the shape of data, and can be optimised to efficient low-level instructions. The Stratego language uses first-class pattern matching, a powerful form of pattern matching that traditional optimisation techniques do not apply to directly.
In this paper, we investigate how to optimise programs that use first-class pattern matching. Concretely, we show how to map first-class pattern matching to a form close to traditional pattern matching, on which standard optimisations can be applied.
Through benchmarks, we demonstrate the positive effect of these optimisations on the run-time performance of Stratego programs. We conclude that the expressive power of first-class pattern matching does not hamper the optimisation potential of a language that features it.
In this paper, we investigate how to optimise programs that use first-class pattern matching. Concretely, we show how to map first-class pattern matching to a form close to traditional pattern matching, on which standard optimisations can be applied.
Through benchmarks, we demonstrate the positive effect of these optimisations on the run-time performance of Stratego programs. We conclude that the expressive power of first-class pattern matching does not hamper the optimisation potential of a language that features it.
Original language | English |
---|---|
Title of host publication | SLE 2022: Proceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering |
Place of Publication | New York |
Publisher | Association for Computing Machinery (ACM) |
Pages | 74-83 |
Number of pages | 10 |
ISBN (Print) | 978-1-4503-9919-7 |
DOIs | |
Publication status | Published - 2022 |
Event | The 15th ACM SIGPLAN International Conference on Software Language Engineering - Auckland , New Zealand Duration: 6 Dec 2022 → 7 Dec 2022 Conference number: 15th |
Conference
Conference | The 15th ACM SIGPLAN International Conference on Software Language Engineering |
---|---|
Abbreviated title | SLE 2022 |
Country/Territory | New Zealand |
City | Auckland |
Period | 6/12/22 → 7/12/22 |
Keywords
- pattern matching
- optimisation
- strategic programming