与CPython,Jython和IronPython相比,PyPy需要提供什么? [英] What does PyPy have to offer over CPython, Jython, and IronPython?

查看:98
本文介绍了与CPython,Jython和IronPython相比,PyPy需要提供什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我在博客上看到和阅读的内容,PyPy是一个非常雄心勃勃的项目.与同级产品(CPython,Jython和IronPython)相比,它将带来哪些优势?是速度,跨平台兼容性(包括移动平台),在没有GIL的情况下使用c扩展的能力,还是更多关于可以做什么的技术练习?

From what I have seen and read on blogs, PyPy is a very ambitious project. What are some advantages it will bring to the table over its siblings (CPython, Jython, and IronPython)? Is it speed, cross-platform compatibility (including mobile platforms), the ability to use c-extensions without the GIL, or is this more of a technical exercise on what can be done?

推荐答案

PyPy实际上是两个项目:

PyPy is really two projects:

  • 解释器编译器工具链,使您可以在RPython(Python的静态子集)中编写解释器,并为JVM,.NET(等)独立编译跨平台的解释器
  • RPython中Python的实现

这两个项目允许很多事情.

  • 在Python中维护Python比在C中维护Python容易得多
  • 从单个代码库中,您可以生成可在JVM,.NET和独立运行的Python解释器-而不是具有多个稍微不兼容的实现
  • 编译器工具链的一部分包括一个实验性的JIT生成器(现在已经进入第五代并且可以很好地运行)- goal 用于让JITed PyPy运行很多比CPython快
  • 尝试使用基本语言功能(例如删除GIL,更好的垃圾回收,集成无堆栈等等)要容易得多
  • Maintaining Python in Python is much easier than maintaining it in C
  • From a single codebase you can generate Python interpreters that run on the JVM, .NET and standalone - rather than having multiple slightly incompatible implementations
  • Part of the compiler toolchain includes an experimental JIT generator (now in its fifth incarnation and starting to work really well) - the goal is for a JITed PyPy to run much faster than CPython
  • It is much easier to experiment with fundamental language features - like removing the GIL, better garbage collection, integrating stackless and so on

因此,PyPy令人兴奋的确有很多原因,它终于开始履行其所有诺言.

So there are really a lot of reasons for PyPy to be exciting, and it is finally starting to live up to all its promises.

这篇关于与CPython,Jython和IronPython相比,PyPy需要提供什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆