In order to achieve shorter execution times of Python code, I look at means of compiling Pythoninto C++. To perform this task, I have written a Python compiler, and this compiler generatesC++ code from a subset of the Python language.
Code generated from this code can in some cases expect to run in about 1/100 of the time usedby ordinary Python.
I will look at the principles behind this compiler, and look at its (quite readable) generatedcode. Off the form of this generated code, I will explain why the compiler emits this fast code.
The compiler is written to be extended by the user, and this thesis also functions as a manual for the system.