Announcement

Collapse
No announcement yet.

PyPy 2.0 Python Alternative Released

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PyPy 2.0 Python Alternative Released

    Phoronix: PyPy 2.0 Python Alternative Released

    Version 2.0 of PyPy, an alternative implementation of the Python language, has been released...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Amazing performance! What's the catch?

    Comment


    • #3
      Originally posted by varikonniemi View Post
      Amazing performance! What's the catch?
      It is not a drop-in replacement for CPython, the default implementation and various popular libraries like NumPy don't work with PyPy yet although there is progress and various web frameworks like Django already work with it just fine. It will just need more time to fix these issues and mature as an implementation but it is very promising even now.

      Comment


      • #4
        Originally posted by varikonniemi View Post
        Amazing performance! What's the catch?
        Python2 only. (There's a WIP python3 branch)

        Why is python2 not regarded legacy universally and why is there still new software developed for it?

        Comment


        • #5
          Originally posted by ChrisXY View Post
          Python2 only. (There's a WIP python3 branch)

          Why is python2 not regarded legacy universally and why is there still new software developed for it?
          Heck, there is a ton of Java code out there with no plans to port to even 1.4.

          Python 3 is not a easy change and it is backward incompatible. Big libraries have only recently received Python 3 support and it just generally takes time to switch over with several kinks in Python 3 gets fixed with later revisions. Moreover there is no real urgency to change since Python 2.x continues to be maintained and is parallel installable with Python 3.

          Comment


          • #6
            Weird

            I find it weird how a Python interpreter written in Python is faster than a Python interpreter in C.
            I don't understand how that can be.

            Also, I heard someone was writing a Ruby interpreter using PyPy.

            Comment


            • #7
              Originally posted by uid313 View Post
              I find it weird how a Python interpreter written in Python is faster than a Python interpreter in C.
              I don't understand how that can be.

              Also, I heard someone was writing a Ruby interpreter using PyPy.
              PyPY is not really written in Python but RPython which is a restricted subset of Python and is optimized for this purpose. Moreover Python is a dynamic language and benefits from the just in time compiler which allows for more optimizations.

              Comment


              • #8
                Originally posted by uid313 View Post
                I find it weird how a Python interpreter written in Python is faster than a Python interpreter in C.
                I don't understand how that can be.

                Also, I heard someone was writing a Ruby interpreter using PyPy.
                The Cpython implementation does not have a JIT AFAIK. Pypy also uses rpython and is compiled to C.
                From Wikipedia:
                Current PyPy versions are translated from RPython to C code and compiled. The PyPy JIT compiler is capable of turning Python code into machine code at run time.

                Comment


                • #9
                  So If I'm understanding this correctly then, it gets it's performance from the fact that it knows how well the code is running from the jit, and can optimize on the fly during runtime?

                  Comment


                  • #10
                    Originally posted by duby229 View Post
                    So If I'm understanding this correctly then, it gets it's performance from the fact that it knows how well the code is running from the jit, and can optimize on the fly during runtime?
                    Yes, thats the general idea before JIT

                    Comment

                    Working...
                    X