Assessing the Overhead of ML Exceptions by Selective CPS Transformation
DOI:
https://doi.org/10.7146/brics.v5i15.19287Resumé
ML's exception handling makes it possible to describe exceptional execution flows conveniently, but it also forms a performance bottleneck. Our goal is to reduce this overhead by source-level transformation.To this end, we transform source programs into continuation-passing style (CPS), replacing handle and raise expressions by continuation-catching and throwing expressions, respectively. CPS-transforming every expression, however, introduces a new cost. We therefore use an exception analysis to transform expressions selectively: if an expression is statically determined to involve exceptions then it is CPS-transformed; otherwise, it is left in direct style.
In this article, we formalize this selective CPS transformation, prove its correctness, and present early experimental data indicating its effect on ML programs.
Downloads
Publiceret
1998-01-15
Citation/Eksport
Kim, J.- taek, Yi, K., & Danvy, O. (1998). Assessing the Overhead of ML Exceptions by Selective CPS Transformation. BRICS Report Series, 5(15). https://doi.org/10.7146/brics.v5i15.19287
Nummer
Sektion
Artikler
Licens
Authors who publish with this journal agree to the following terms:- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).