IsaaMaster's blog

By IsaaMaster, history, 2 months ago, In English

Hello All,

Just out of curiosity what is the difference between Pypy3 and Python3 in terms of runtime? I know generally Pypy3 is faster but sometimes Python 3 is faster. Is there a way of knowing beforehand which will be faster?

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

»
2 months ago, # |
  Vote: I like it +5 Vote: I do not like it

PyPy3 is much faster than Python3 for just about everything. In my experience, the main time it's slower is just for I/O.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    pypy uses alot more memory tho. Also sometimes it does perform worse than cpython

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    And while dealing with big integers, if I'm not wrong.

»
2 months ago, # |
  Vote: I like it +3 Vote: I do not like it

If you see big integers involving in a problem go with python else pypy always be faster. 123994619 TLE in python 123994740 Accepted in pypy 120130588 TLE in pypy 120097414 Accepted in python

Blog you can see why it happens in this blog.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Sometimes both of them suck. The same solution in Python(TLE), Pypy(MLE), C++(Accepted).

There can be a more efficient solution for this particular question, but if the same logic is accepted in one language, why not in other? I've encountered many such situations. : /