PyPy is an alternative Python interpreter, which is known for it’s speed. However it does not have to be always faster as ‘classic’ Python interpreter (called here CPython). For one small project of mine – PDF Checker – I was testing PyPy hoping to speed up PDF document processing (basically parsing to extract text – pdfminer library is used and document parsing takes majority of time). Below are results from running program for two different files and in CPython interpreter or in PyPy (with JIT and without JIT compilation):
CPython | PyPy | PyPy with JIT disabled | |
Small PDF (110kB) | 1.1 s | 2.4 s | 2.5 s |
Big PDF (996kB) | 16.6 s | 10.9 s | 36.5 s |