An Executable Semantics for Faster Development of Optimizing Python Compilers - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2023

An Executable Semantics for Faster Development of Optimizing Python Compilers

Résumé

Python is a popular programming language whose performance is known to be uncompetitive in comparison to static languages such as C. Although significant efforts have already accelerated mplementations of the language, more efficient ones are still required. The development of such ptimized implementations is nevertheless hampered by its complex semantics and the lack of an official formal semantics. We address this issue by presenting an approach to define an executable semantics targeting the development of optimizing compilers. This executable semantics is written in a format that highlights type checks, primitive values boxing and unboxing, and function calls, which are all known sources of overhead. We also present semPy, a partial evaluator of our executable semantics that can be used to remove redundant operations when evaluating arithmetic operators. Finally, we present Zipi, a Python optimizing compiler prototype developed with the aid of semPy. On some tasks, Zipi displays performance competitive with that of state-of-the-art Python implementations.
Fichier non déposé

Dates et versions

hal-04391611 , version 1 (12-01-2024)

Licence

Paternité

Identifiants

Citer

Olivier Melançon, Marc Feeley, Manuel Serrano. An Executable Semantics for Faster Development of Optimizing Python Compilers. SLE ' 2023 : 16th ACM SIGPLAN International Conference on Software Language Engineering, Oct 2023, Cascais Portugal, Portugal. pp.15-28, ⟨10.1145/3623476.3623529⟩. ⟨hal-04391611⟩

Collections

INRIA INRIA2
19 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More