Sun 4 Nov 2018 15:55 - 16:15 at Stuart - II Chair(s): Adam Welc

Python is a multiple paradigm language. The language is dynamically typed, offers object-oriented, procedural and functional features. It is often used for scripting but is also widely used for general purpose programming. The Python language is designed to be easy to use with permissive features, even if it means compromising performance. For example it is possible to add a new property to an object after its creation. Many other dynamic features are available and represent a challenge to implement efficiently.

The main implementation of the language is CPython which is a bytecode interpreter written in C. Using an interpreter easily allows adding new features into the language. It is also the most straightforward way to implement dynamic features Python. The principal project other than CPython is PyPy. PyPy is a meta-tracing implementation of Python bytecode. While its performance are decent and much better than CPython, it still falls behind other dynamic language implementations like virtual machines for JavaScript. The PyPy interpreter has the advantage of being easy to extend and maintain compared to a JIT compiler.

Today, there is no native JIT compiler currently in development for Python. In this talk we will present an under-development Python JIT compiler called Twopy. We propose to explore possibilities of using Python with code specialization. We will use the Basic-Block Versioning technique, which has proven to be well suited to the compilation of dynamic languages such as JavaScript and Scheme. Our virtual machine is written in Python and we use its bytecode as our source language. We lazily compile this code on the fly to x86_64 assembly. Our implementation aims at offering good performance for general programs in pure Python.

Our preliminary results show that our compiler can remove around 80% of type-checks on small benchmarks containing mainly binary operations. In the future we plan to extend basic block versioning to handle different issues with Python implementation. For example we want to explore using this technique as an optimization to object-oriented mechanism implementation in Python. We think that this technique can be used in multiple and new ways to handle dynamicity in Python.

Sun 4 Nov
Times are displayed in time zone: (GMT-05:00) Guadalajara, Mexico City, Monterrey change

15:30 - 17:05: VMIL 2018 - II at Stuart
Chair(s): Adam WelcUber Technologies
vmil-201815:30 - 15:55
Research paper
Baptiste SaleilUniversité de Montréal, Marc FeeleyUniversité de Montréal
vmil-201815:55 - 16:15
Julien PagèsUniversité de Montréal, Marc FeeleyUniversité de Montréal
vmil-201816:15 - 16:40
Research paper
Baptiste PaugetÉcole Normale Supérieure, David PearceVictoria University of Wellington, Alex PotaninVictoria University of Wellington
DOI Pre-print File Attached
vmil-201816:40 - 17:05
Research paper
Eliot MirandaCadence Design Systems, Clément BéraSofware Languages Lab, Vrije Universiteit Brussel, Elisa Gonzalez BoixVrije Universiteit Brussel, Dan Ingalls