Is PyPy often faster than C

If I am using PyPy, does it often times generate more efficient code than C?


That depends. What sort of code are you writing? Are you a brilliant C
coder who can write incredibly optimized and efficient C code, and a
terrible Python coder who writes poor, inefficient Python code? Or
perhaps the other way around?

PyPy uses a JIT compiler, so it needs time to warm up. It needs to run
your code and discover the “hot spots” that can be optimized at run
time. That means that PyPy is best for code that has large, complex
loops that get executed many times, not for short scripts.

I have to ask, what sort of code are you writing that you care so much
about all this stuff? Have you profiled your code to see what the
bottlenecks are, so that you can concentrate on speeding up the parts of
the code that matter, instead of spending days optimizing
code that saves you only 0.1 millisecond?

If you explain what your intention is, and your previous coding
experience, we can probably advise whether Python will be a good fit.