Optimizing the interpreter by adding a compiler