Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Python

After 3-Year Hiatus, 'Pyston' Runtime Returns to Make Python Code Faster (infoworld.com) 27

"Development of Pyston, a variant of the Python runtime that uses just-in-time compilation to speed up the execution of Python programs, is back on again," reports InfoWorld — after a hiatus that began in 2017: Picking up where Dropbox left off, a new development team has released Pyston 2.0. Pyston provides what is ultimately intended to be a drop-in replacement for the standard Python runtime, CPython. It's compatible with Python 3.8, so programs that runs with that version of Python should run as-is on Pyston...

One of the goals of the project was to remain as close as possible to the original implementation of CPython, since many third-party projects make assumptions about CPython behavior. Thus Pyston 2.0 began with the existing CPython codebase and added features from Pyston 1.0 that worked well, such as caching attributes and JITting. Pyston's JIT no longer uses LLVM, but DynASM to emit assembly directly...

[U]nlike the original Pyston incarnation, the new version is closed-source for the time being, as its new stewards determine their business model.

This discussion has been archived. No new comments can be posted.

After 3-Year Hiatus, 'Pyston' Runtime Returns to Make Python Code Faster

Comments Filter:
  • You lost me (Score:5, Insightful)

    by 1s44c ( 552956 ) on Saturday October 31, 2020 @05:36PM (#60669924)

    Sounds cool up to the words "closed source". There you lost me.

  • don't see it gaining traction being closed source

  • Interesting...so now both PHP and Python use DynASM instead of LLVM JIT. Mike Pall must be proud.
  • by fluffernutter ( 1411889 ) on Saturday October 31, 2020 @06:08PM (#60669998)
    Why use JIT compilation when you can just compile a binary package like with py2exe?
    • by ffkom ( 3519199 )
      Indeed, it is not obvious where exactly between CPython, Cython and PyPy there is a gap for "Pyston" waiting to be filled. Luckily, having surplus implementations of a language does no harm.
      • by tepples ( 727027 )

        A different approach might help for a Python program relies on C extensions that haven't been ported to CFFI, such as Pillow (Python Imaging Library). PyPy imposes a substantial overhead per call that goes through CPython's other C bindings (Python C API and ctypes). One example is a program that calculates the average value of each 16x16-pixel chunk of a difference image as a way to determine which of four 4-color palettes best represents that chunk. The conventional way to do this in Pillow requires a cou

    • Re:Why? (Score:4, Informative)

      by lbates_35476 ( 901961 ) on Saturday October 31, 2020 @06:52PM (#60670102)
      py2exe is a packager and it doesn't compile anything to machine code. The Python byte-code is just packaged up into a .EXE file for ease of use and distribution.
      • I'm not a Python user, but surely someone has developed a true Python machine code compiler before now? It seems like such an obvious thing to do for a very popular language...

        • There have been several attempts, but like Java some of the power of Python lies in the fact that it runs as byte code and is not compiled in the traditional sense. If you want you can always isolate routines that would benefit from running as compiled code and call them from Python. Many of the add-on libraries are done this way. If you haven't used Python you will be surprised at how well it runs without compiling.
    • What has py2exe have to do with anything? It doesn't generate native code the way that DynASM does.
    • by Quarters ( 18322 )

      Py2EXE just packages your Python code, the required std and 3rd party modules and a python interpreter into an exe package. Nothing is compiled. For compiled Python you need to use Nuitka (https://www.nuitka.net)

  • "...the new version is closed-source for the time being, as its new stewards determine their business model."

    With a statement like that I think I can predict the ending to this story: a free version and a paid version.

  • by spongman ( 182339 ) on Sunday November 01, 2020 @01:24AM (#60670896)

    I know this is probably trolling, but duck it this is slashdot, who cares?

    But really, why is everyone so gung-ho about Python? Coding with it feels like performing fine antique cabinetry restoration with fisher-price toys.

    • by Junta ( 36770 )

      Python codebases tend to be more approachable, and like other interpreted languages lends itself well to having snippets be played around with.

      Essentially, the community is geared toward straightforward and readable code with a particularly 'obvious' single approach if at all possible. This at times can mean more tedium (another language might offer obscure shorthand for some cases, python tends to say stick with the tedious way because we don't want to have multiple ways to do it). It very frequently leads

    • by Quarters ( 18322 )

      Just because I work in the digital content creation space and Python is the lingua franca for practically all DCC applications I shouldn't be on Slashdot? Screw off.

  • Numba provides a JIT as open source and is used in a lot of projects. How can Pyston compete to that?

God doesn't play dice. -- Albert Einstein

Working...