Using Procedure Cloning for Performance Optimization of Compiled Dynamic Languages
Robert Husák, Jan Kofroň, Jakub Míšek, Filip Zavoral
2022
Abstract
Compilation of dynamic programming languages into strongly typed platforms such as .NET and JVM has proven useful in enhancing the security and interoperability of the resulting programs, as well as in enabling their source-less distribution. In order to produce the best intermediate code possible, dynamic language compilers can employ advanced interprocedural type analysis and perform various optimizing transformations. However, these efforts are often limited due to the ambiguity of types in these languages and the need to preserve soundness. In this paper, we improve the performance of global functions by adapting the technique of procedure cloning, focusing on different parameter types those specialized clones can be called with. We devise several heuristics to identify the most promising specializations and call them from their respective call sites. Our technique was implemented into PeachPie, a compiler of PHP to .NET, and evaluated on standard benchmarks distributed with PHP. Benchmarks containing deep recursion show a speedup factor up to 3.65, while benchmarks of computation-intensive loops reveal a speedup factor up to 2.64.
DownloadPaper Citation
in Harvard Style
Husák R., Kofroň J., Míšek J. and Zavoral F. (2022). Using Procedure Cloning for Performance Optimization of Compiled Dynamic Languages. In Proceedings of the 17th International Conference on Software Technologies - Volume 1: ICSOFT, ISBN 978-989-758-588-3, pages 175-186. DOI: 10.5220/0011272300003266
in Bibtex Style
@conference{icsoft22,
author={Robert Husák and Jan Kofroň and Jakub Míšek and Filip Zavoral},
title={Using Procedure Cloning for Performance Optimization of Compiled Dynamic Languages},
booktitle={Proceedings of the 17th International Conference on Software Technologies - Volume 1: ICSOFT,},
year={2022},
pages={175-186},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0011272300003266},
isbn={978-989-758-588-3},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 17th International Conference on Software Technologies - Volume 1: ICSOFT,
TI - Using Procedure Cloning for Performance Optimization of Compiled Dynamic Languages
SN - 978-989-758-588-3
AU - Husák R.
AU - Kofroň J.
AU - Míšek J.
AU - Zavoral F.
PY - 2022
SP - 175
EP - 186
DO - 10.5220/0011272300003266