Why is PyPy (without JIT) slower than CPython

Viewed 267

recently i'm doing some performance tests with PyPy (Compared to CPython)

I use the nested loop matrix multiplication from this site: https://www.programiz.com/python-programming/examples/multiply-matrix

I execute it 1 mio. times and measure the time with timeit.

With CPython it takes about 10s to finish. With PyPy it only takes about 0.7s to finish.

This result is exactly what i would expect. Just out of curiousity i disabled JIT in PyPy and ran the test again. Now PyPy takes about 80s to finish the test.

So right now i am wondering why PyPy is extremely slow without JIT? (I know disabling JIT is not how PyPy should be used, but i want to understand why it so slow without JIT)

0 Answers
Related