Lance_HAOH's blog

By Lance_HAOH, history, 6 years ago, In English

Hi. I have been experimenting with Python for CP lately. I read from various sources, including this, that running Python code in PyPy 2 will speed up runtime by a lot as compared to the Python 2 interpreter. Tests that I performed in the SPOJ enormous input test seemed to confirm this.

I recently tried to solve another problem on CodeForces using Python. I submitted the exact same code using both PyPy 2 and Python 2 options. However, the PyPy option clearly got TLE while the Python 2 option got AC comfortably.

My submissions using PyPy 2 and Python 2.

I am unable to explain this contradiction as I am new to Python. Is any Python expert here able to explain this strange occurrence please? Thanks in advance.

  • Vote: I like it
  • +2
  • Vote: I do not like it