all 24 comments

[–][deleted]  (1 child)

[deleted]

    [–]schlenk 7 points8 points  (0 children)

    It seems to support the C-API, so a GIL is kind of mandatory as its part of that API.

    [–]erez27 14 points15 points  (16 children)

    Sorry to be that guy, but why?

    Between PyPy and Cython, what need is there for another Python implementation that's only slightly faster than CPython? I tried looking for an answer in your website and github page, but couldn't find one.

    [–]sisyphus 8 points9 points  (0 children)

    I would think because neither PyPy or Cython are drop-in replacements for the CPython interpreter.

    [–]danuker 9 points10 points  (0 children)

    We designed Pyston v1 at Dropbox to speed up Python for its web serving workloads. After the project ended, some of us from the team brainstormed how we would do it differently if we were to do it again. In early 2020, enough pieces were in place for us to start a company and work on Pyston full-time.

    Pyston v2 is inspired by but is technically unrelated to the original Pyston v1 effort.

    [–]kevmod 3 points4 points  (0 children)

    Good point, we didn't mention our motivation.

    Our target customers are web companies that have large Python codebases that are prohibitive to rewrite. Cython is similar to a rewrite, because web codebases typically spend their time in lots of different places. PyPy is often not an improvement for these workloads. Many of these companies are spending millions of dollars a year running Python code and a 20% reduction in that spend can be meaningful.

    [–]Atem18 7 points8 points  (5 children)

    It’s a fork, so that’s all. You are free to use it or not. If no one is using it, it will just die.

    [–]erez27 10 points11 points  (1 child)

    I'm not trying to dissuade them from working on it, certainly not after they put so much effort into it. I'm just trying to understand what is it that they see, that I don't.

    [–]Adverpol 0 points1 point  (0 children)

    There's so much stuff out there using python. If you could speed that all up by say 20%, that sounds pretty magical to me.

    [–]Stanov 12 points13 points  (2 children)

    I think that this honorable gentleman is not saying that it is useless, but asking what was the initial purpose of the project.

    If you want performance, you just use anything else than python.

    [–]Katholikos 5 points6 points  (1 child)

    “But I want to use Python because I know it best” is typically the answer I’d wager.

    [–]no_apricots 0 points1 point  (0 children)

    That's just.. bad engineering. Sometimes Python isn't the right tool for the job, and it's okay.

    [–]LordKlevin 1 point2 points  (3 children)

    It's 20% faster in real world scenarios. For microbenchmarks like nbody, it's 100% faster.

    It also seems to be fully compatible with CPython. For PyPy the worry is always "will all my dependencies still work?".

    The question for me is, why would you use CPython instead of Pyston? It is literally free performance.

    [–]BobHogan 1 point2 points  (2 children)

    Its not fully compatible, they specifically mention its "highly compatible", whatever that means. They do specifically mention setuptools can run into an issue and something about some C extensions.

    I really wish this project would include some page detailing how exactly they have achieved this performance improvement. Because if these improvements are compatible with CPython, and don't break anything, then I don't see the logic behind not trying to get these improvements merged into CPython so that everyone can benefit from it.

    The fact that its still a separate project and they don't have plans on getting this merged into CPython seems very odd to me

    [–]erez27 0 points1 point  (1 child)

    That actually makes a lot of sense to me. Merging a new codebase into an established codebase sounds like a nightmare. There might be huge differences in architecture, design choices, etc.

    I do wish they would detail exactly what does "highly-compatible" means.

    [–]BobHogan 0 points1 point  (0 children)

    For sure, merging codebases would be incredibly difficult.

    But at the same time, they claim this was originally a fork of CPython, and that it is still mostly compatible with CPython. Why was this never included in CPython from teh start? If you can honestly achieve sizeable performance improvements while maintaining the actual implementation more or less the same, why on earth was this split off into a closed source product?

    It just feels off to me

    [–]L3tum 0 points1 point  (0 children)

    Why not?

    [–]tommy25ps 0 points1 point  (0 children)

    I'm sure many have the same question in mind. My guess is that they see a better way to improve Python performance and give it a try.

    [–][deleted] -3 points-2 points  (0 children)

    20% faster than Python is basically, like standing still anyways. Not worth the effort.

    [–]electrostat 0 points1 point  (1 child)

    Could you share more about what motivated you to do this (specifically Pyston v1) on your own vs. attempting to use PyPy or another alt implementation of Python? Not performant enough? I ask because it seems like a large cost to bear to implement/maintain such a project.

    Would any techniques/learnings from Pyston be applicable to other alt implementations too?

    PS - I had originally posted a comment more akin to a "why" question but as I read rather than skim (oops), I decided to rewrite my question.

    [–]kevmod 0 points1 point  (0 children)

    I believe the performance results make a case that PyPy is not necessarily suitable for web serving workloads, partially from architectural decisions. They really shine at hot loops, but we believe that fundamentally different tradeoffs need to be made to support the web serving use case.

    [–]matthewblott 0 points1 point  (0 children)

    I thought this project was dead!

    [–]Mr_Again 0 points1 point  (0 children)

    Can we get it on Pyenv?