Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming Python

Python Implementation Pyston Aims To Speed Up the Programming Language's Code for Web Applications (techrepublic.com) 55

An anonymous reader shares a report: When Kevin Modzelewski and his colleagues at Dropbox set out to create Pyston in 2014, they had a very simple objective: to lower the costs of running Python code on Dropbox's servers, by making the code itself faster. "We were growing exponentially, so our server cost was growing exponentially," Modzelewski tells TechRepublic. "If we could get Python running faster, we would spend less money running Python." The original cost reduction initiative at Dropbox snowballed into a bigger project for Modzelewski when the company moved away from Python in 2017 and cancelled the Pyston project. He had realized while working on the language that there was a strong demand for faster Python among the developer community, and while there were plenty of tools around for improving the performance in smaller applications, there were none designed for big, business logic-type applications such as Dropbox.

"There's a lot of tools out there for helping you run Python faster, but there weren't any that were a good fit for Dropbox's use case," says Modzelewski. "This was an area of the Python market where a lot of money was being spent, but not very many tools were being developed for helping. It was under served." Fast forward to today and Pyston is now in version 2.2, and has been open-sourced, with Modzelewski and fellow developer Marius Wachtler now leading the project as co-founders. The latest implementation promises a 30% performance improvement over Python 3.8.8, with a key benefit being that developers can simply drop their Python applications into Pyston and get going, without having to rewrite their code. It's also a "completely separate thing" to what Modzelewski and fellow developers built for Dropbox some seven years ago.

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

Python Implementation Pyston Aims To Speed Up the Programming Language's Code for Web Applications

Comments Filter:
  • by Ostracus ( 1354233 ) on Tuesday June 29, 2021 @02:41PM (#61534646) Journal

    Take out all the white space. ;-)

  • Alternatives (Score:3, Informative)

    by strombrg ( 62192 ) on Tuesday June 29, 2021 @03:29PM (#61534816) Homepage
    Pyston may be interesting some day.

    For now, I think I'll stick with a mix of Pypy3 (JIT'd, single-threaded, high performance), Cython (allows pretty freely intermixing Python and C datatypes for compatibility and performance), Micropython (which appears to thread well) and Numba (a JIT for your innermost CPU-loop in CPython).

    BTW, Python is dandy for large, multi-developer projects, but for that it's important to use Mypy (PEP484) or at least Pylint (with a tailored pylintrc to turn off some of the unnecessary warnings, while keeping the important stuff).
    • Re:Alternatives (Score:4, Interesting)

      by sg_oneill ( 159032 ) on Wednesday June 30, 2021 @12:12AM (#61536110)

      The Type hints from PEP484 are frigging amazing. Folks, don't think of it as a chore. This stuff makes your job *easier* by making your IDE finally understand whats going on, a task thats very difficult without type hinting. But with the hints? PyCharms type completion is borderline magica.

      Plus I'm pretty certain that eventually all the compile-python schemes will end up requiring them to compile performant sensible code.

  • No. (Score:2, Insightful)

    by Gravis Zero ( 934156 )

    Sophisticated "web applications" need to die. They will live on because fools are sold on the idea of "put it in the cloud" but as a curmudgeon, I never shall. I refuse to give in to rent seeking, spying, and other bullshit behavior that needs to be connected 100% of the time.

    • by lsllll ( 830002 )
      While I do not subscribe to the cloud Kool-Aid, I think most developers would disagree with you, as is evident by the web front-ends to almost any software that's used by more than a few people or software that needs to be accessible from everywhere (for support, eg. Proxmox)
      • Re: (Score:2, Interesting)

        "web Front Ends" are usually developed out of laziness. It costs money to pay someone to write a proper front-end, but a web-kiddie can whip up a javascript infested (and godawfully fucking slow) "web interface" in an afternoon. This is why web front ends to anything are usually abysmal hunk of shit.

        • there are plenty of web front ends that disagree.

          And your reasoning is wrong anyway.

          Bottom line take the right tool for the job. If you write "a proper frontend", how do you distribute it? HTLM/JS comes from the server, simple.

    • by Tablizer ( 95088 )

      If the person who signs your check wants their data in the cloud, you have to put it in the cloud. It's not your choice. If you want your own start-up, then form your own. Otherwise, the boss is the boss. Work World 101.

      • I was not referring to work, I was talking about people who willfully use sophisticated "web applications". If businesses want shoot themselves in the foot, fine but don't then turn around and support their efforts. Doing so only propagates the sickness.

  • PyPy already does 7x speed ups on Python and is 95% compatible, which is a 2 weeks dev time port for a standard project. This is trying to do a 2x speed up on Python at 100% compatible. What we need is something that does a 25x speed up and is 80% compatible.
    • by strombrg ( 62192 )
      There's currently a project to make CPython faster, with Guido Van Rossum heavily involved.

      I think the most important for Python's future, more than runtime optimization, is HPy: a better API for Python: https://github.com/hpyproject/... [github.com]

      Granted, it'll take a while to move most "C Extension Modules" to HPy, but it should allow runtime developers a great deal more latitude in creating faster runtimes.
  • Pissed-on⦠Really?

  • So pyston is only excruciatingly slow instead of abysmally slow. Sounds great.

    • by strombrg ( 62192 )
      I've posted elsewhere here on a mere smattering of the better ways of speeding up Python code.

      The more important point is that Developer Time is much more expensive than Machine Time, so it makes more sense to use something you can code in rapidly and effectively.

      I used to think assembly language was the bee's knees. I got over it. You likely should move on too.
  • None of this makes any sense.

    • In what way can Dropbox be called a complicated application? It serves and receives files!
    • If you need to heavily optimise a codepath in Python, write it in C and call it from Python if you really must
    • In what world would I/O not be Dropbox's bottleneck over application speed?
    • by Tablizer ( 95088 )

      In what way can Dropbox be called a complicated application? It serves and receives files!

      They want it droppier and boxier?

      In what world would I/O not be Dropbox's bottleneck over application speed?

      I suspect snoopware running AI so they can serve you the right underwear ads.

  • The first implementation that people have already Pyston?

A good supervisor can step on your toes without messing up your shine.

Working...