Why is Python slow
I think it&#x27;s true that language implementations such as Ruby and Python spend most of their time running the C parts of the code. I did a talk saying the same thing about Ruby a couple of weeks ago, but referring to the Java code in JRuby, <a href="https:&#x2F;&#x2F;ia601503.us.archive.org&#x2F;32&#x2F;items&#x2F;vmss16&#x2F;seaton.pdf" rel="nofollow">https:&#x2F;&#x2F;ia601503.us.archive.org&#x2F;32&#x2F;items&#x2F;vmss16&#x2F;seaton.pdf</a>.<p>But this doesn&#x27;t mean that a JIT is not going to help you. It means that you need a more powerful JIT which can optimise through this C code. That may mean that you need you to rewrite the C in a managed language such as Java or RPython which you can optimise through (which we know works), or maybe we could include the LLVM IR of the C runtime and make that accessible to the JIT at runtime (which is a good idea, but we don&#x27;t know if it&#x27;s practical).<p>I work on an implementation of Ruby, and we make available the IR of all our runtime routines (in our case implemented in Java) to a powerful JIT, so that we can inline from the interpreter into the runtime and back again.<p>In the case of Python, PyPy does the same thing, allowing the JIT to optimise between the interpreter and runtime, as they&#x27;re both written in RPython.<p>So I think the problem the Pyston project needs to solve is how to allow the JIT to see the runtime routines and optimise through them like it does with Python code.