Profiling the Performance of Programming Language Runtimes and Towards Building a New Python Runtime
Adrian Chiu · TSpace (University of Toronto) · 2021
Software is increasingly being written in higher level languages, which are typically implemented on top of a language runtime. This thesis presents an analysis of the performance of 4 popular language runtimes: OpenJDK, V8/Node.js, CPython, and PyPy. Notably, we find that in comparison, the performance CPython, the de facto Python runtime today, is significantly lacking. CPython only has an interpreter, and does not have a just-in-time compiler. Hence, it is 29.5x slower than V8. This motivates the second contribution of the thesis: it presents the initial design and implementation of a new optimizing Python runtime, consisting of nearly 20000 lines of code. We present a modification of the strongly connected components (SCC)-based value numbering algorithm used in the GNU Compiler Collection (GCC) C++ compiler that incorporates dead code elimination, and show that there is code that our algorithm can optimize that SCC-based value numbering and dead code elimination performed separately cannot.