Python 2.x vs 3.x Speed

后端 未结 5 1616
礼貌的吻别
礼貌的吻别 2021-02-06 22:32

I\'m a PhD student and use Python to write the code I use for my research. My workflow often consists of making a small change to the code, running the program, seeing whether

5条回答
  •  长发绾君心
    2021-02-06 23:12

    Right now, speed on Python 3 is more or less the same as Python 2... If you're looking for speed, it's not on Python 3 vs Python 2 but in other tools like Psyco, Cython, etc...

    But, very recently, there have arisen plans to merge Unladen Swallow, the Google project to implement a JIT over Python with Python 3. Of course, it won't be very soon, but, in some time, maybe the speed will increase noticeably on Python 3 over Python 2. They claim to have already increased speed on a 10% (on Python 2). Their objective is increasing the speed to 5x.

    For more information, see PEP 3146

    EDIT: Just as Brian remarks, PEP 3146 was retired.

提交回复
热议问题