back to article Guido van Rossum aiming to make CPython 2x faster in 3.11

Python creator Guido van Rossum this week told attendees at the Language Summit that he hopes to double performance in version 3.11. The programming language is relatively slow in its default CPython implementation, though there are many ways to make it faster including performance-oriented alternatives like PyPy. Historically …

  1. thames

    The proof of the pudding will be in the eating.

    From reading the references, it appears that they hope to get most of the performance increase from using an "adaptive specializing interpreter". Experiments with this have given a 25% to 50% increase in performance.

    The real question of course will be what sort of applications will benefit from this. Most comparative language micro-benchmarks you see on the Internet were written to show off specific optimizations of particular compilers. If your code deviates too much from the micro-benchmark the performance vanishes.

    One of the previous attempts at performance optimization in Python was called "Unladen Swallow" and involved adding an LLVM based JIT compiler to Python. It did fantastic on the common multi-language micro-benchmarks that many people like to use. However, tests in actual applications found that it made real world code slower.

    The Unladen Swallow team then constructed a set of benchmarks based on a selection of large blocks of code used in a broad selection of common applications. Based on the results of this they decided the LLVM based JIT compiler was not a promising approach after all, and that standard JIT compilers were not a magical solution.

    The only thing that survived from the Unladen Swallow project was the benchmark, which subsequent projects such as Pypy. The latter is another Python implementation, which uses a "specializing JIT compiler" and which does show real performance increases but sacrifices compatibility with C extensions (which is why it has seen limited use).

    The way these sorts of projects tend to go is that we won't really know whether the ideas being pursued will actually work until it's done and tested on real world code. Overall though, it looks very interesting.

    1. druck Silver badge

      Re: The proof of the pudding will be in the eating.

      This is very welcome and will more than reverse the small loss of performance when migrating from Python 2.

  2. ST Silver badge
    Mushroom

    I got bored sitting at home while retired ... I chose to go back to my roots

    Please don't. You've done enough damage already.

    Retirement at Microsoft is good. Really good.

    1. Fruit and Nutcase Silver badge
      Joke

      Re: I got bored sitting at home while retired ... I chose to go back to my roots

      Who knows, a newly divorced Bill Gates, with only half his billions to give away may find he is bored now that he Melinda won't be getting him to help with the housework either, decides to get back to his roots and start coding at Microsoft

      1. Anonymous Coward
        Anonymous Coward

        Re: I got bored sitting at home while retired ... I chose to go back to my roots

        Did Bill ever do any actual coding?

        1. BinkyTheMagicPaperclip

          Re: I got bored sitting at home while retired ... I chose to go back to my roots

          Yes. He was pretty decent at writing the early BASIC interpreters by all accounts.

          1. Anonymous Coward
            Anonymous Coward

            Re: I got bored sitting at home while retired ... I chose to go back to my roots

            I stand corrected. Never did get into ms basic.

        2. Mozzie

          "Did Bill ever do any actual coding?"

          He did, and he did it well in the early days.

          No matter my personal opinion of Microsoft, their business tactics, their senior employees from chairman to 'Chair'man, their modern coding practices (since 1986).... Gates and Allen were pretty talented and worked hard early on.

          In my head IBM were to blame for the focus to shift from technology to business, and shareholders in hand with Ballmer were to blame for taking technology around the back of the shed for a quick bang. Take that how you will.

          As a mainly python oriented developer I feel a little concern at the future with Guido suddenly chipping in again from Microsoft's turf, especially after their 'assistance' with javascript and anybody thinking asyncio is an attractive implementation.

          1. Anonymous Coward
            Anonymous Coward

            Re: "Did Bill ever do any actual coding?"

            "especially after their 'assistance' with javascript "

            You're talking about Typescript I guess. It's a huge PRACTICAL improvement over plain Javascript. It's not perfect, but is an enormous practical improvement, and the source is open. They've even made a honest effort to allow language extensibility by adding entry points in the software transforming TS to JS.

            I'm sure you are extremely intelligent with valid criticisms, I just don't think it can be portrayed as a failure by any means.

  3. Doctor Syntax Silver badge

    "This is Microsoft's way of giving back to Python."

    You wrote something there I didn't understand. Microsoft giving back?

  4. jwo

    A little late, no? I wonder if he has ever taken notice of projects like Stackless.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021