Development

This Week in Programming: Python Aims for a 5x Speed Boost

22 May 2021 6:00am, by

If you keep up with the horse race that is programming language popularity, you know that Python is among the top tier of beloved languages, especially when it comes to realms like machine learning and data science. The language is popular for a number of reasons, among them its readability, ease-of-use, and its extensive ecosystem. One thing that sets Python back, however, when compared to some other languages is its speed, and the news causing some waves this week is that former benevolent dictator for life (BDFL) Guido van Rossum is working to give Python a bit of a boost in the speed department.

The news came earlier this week at the Python Language Summit, where van Rossum let the cat out of the bag on his secret plans and the secretive source of funding he’d secured for them: Microsoft.

“We’ve been in stealth mode until the summit, but the cat is now definitely out of the bag — Microsoft is thanking the Python community by funding work to speed up CPython,” van Rossum wrote to the Python mailing list this week, noting that he and two others would be heading up the effort to make CPython five times faster in the next four years.

The two others joining van Rossum include core Python developer and Microsoft senior software engineer Eric Snow, and Mark Shannon, the man behind what van Rossum refers to as the “Shannon Plan.” Shannon had posted his plan to the python-dev mailing list last October seeking funding, and van Rossum credits a bit of pandemic downtime, along with Microsoft allowing him to choose a project to work on, with the idea taking off, calling this strategy “Microsoft’s way of giving back to Python” in slides accompanying his talk earlier this week.

If you’re curious as to WHY Python isn’t as fast as some of its counterparts, a blog post at iProgrammer offers a simple explanation: part of that ease-of-use and readability comes at the cost of speed, as the compiler — in this case, CPython — is responsible for parsing out the remaining complexity.

With Shannon’s plan now funded by Microsoft, the current plan is for Python 3.11 to be faster by a factor of two, with an eventual goal of 5x, and all of it done out in the open and in collaboration with the core Python developers. Van Rossum explained in his presentations that even the 2x speedup is “far from certain,” and that beyond that they’ll “have to be creative” with “machine code generation in our future.”

This Week in Programming

  • Google Debuts A Google-Centric Dev Library: This past week, Google held its Google I/O developer conference, where it debuted a slew of new features and products, in large part for Android developers. One announcement that stood out to us was Google’s new open source content library, the Developer Library, which highlights the best (according to Google) open source technologies related to its products. Currently, the projects are organized in six categories – Machine Learning, Flutter, Firebase, Angular, Cloud, and Android – and Google says there are more to come. While there are plenty of other places to find open source projects, Google says this effort stands out in that “each piece featured on the site is reviewed, in detail, by a team of Google experts for accuracy and relevancy, so you know when you view the content on the site it has the stamp of approval from Google.” If you’re interested in adding to the collection, you can submit your project for review.
  • AWS Introduces App Runner To Ease Container Image Deployment: While containers provide “speed, productivity, and consistency,” writes Amazon Web Services‘ technical evangelist Martin Beeby, “there is one aspect of the container development workflow that I do not like: the lengthy routine I go through when I deploy a container image for the first time.” From setting up a load balancer and TLS to creating a CI/CD pipeline and configuring the domain, the process is still a lengthy one and AWS’s answer to this is its newly released AWS App Runner, which it says will take you from code to scalable, secure web application in mere minutes. AWS App Runner offers automatic scaling, no cold starts, and offers built-in operational and security best practices, deploying your application either connecting to your source code or to a container registry. AWS partnered with MongoDB, Datadog and HashiCorp to provide the service, and has integrations with Pulumi, Logz.io, and Sysdig, as well. AWS App Runner is available today, with costs based on compute and memory used. For more information, see the App Runner pricing page.

  • GitHub Open Source Artifact Exporter, Launches Podcast: In this week’s news out of GitHub, the company has released an open source tool to help large organizations with reporting. The GitHub Artifact Exporter will help teams export granular data for audits, offering a simpler way to access the data than via its API, instead, allowing developers to simply download the data in CSV and JSON rather than learning the GitHub API. The Artifact Explorer offers both a command-line interface and GUI to explore GitHub Issues and comments, allowing users to search and filter. The CLI also supports exporting commits, milestones, projects, pull requests and releases, as well as associated issues and comments. And while we’re here talking about GitHub, it seems noteworthy to mention its newly launched podcast, The ReadME Podcast, which starts out with three episodes featuring Gina Häußge from OctoPrint, Evan You from Vue, and Scott Hanselman and Mark Downie from Das Blog. Seems worth a listen.
  • Envoy Proxy on Windows Goes GA: All of you cloud native developers are obviously familiar with the Envoy proxy, but up until now it has only been available on Linux. This week, the project announced its general availability on Windows, a goal it says it has had since 2016. The release of Envoy on Windows seems like part of an emerging and hopeful trend for developers following last week’s news that eBPF would also be making its way onto Windows. The port of Envoy was made possible by the Envoy-Windows-Development group, a group primarily composed of developers from VMware and Microsoft, which last year put out an alpha release of the project. Since that release, the team has also added additional features, enabled continuous integration, and improved the performance and reliability of Envoy on Windows, all of which are detailed in the blog post. Nonetheless, they say that they “still have a lot to work to get Envoy on Windows to parity with Linux” and are currently working on improving performance and binary distribution, as well as integrating with service meshes “like OSM, on the upcoming Windows Server 2022 release.”

The New Stack is a wholly owned subsidiary of Insight Partners. TNS owner Insight Partners is an investor in the following companies: MADE, Sysdig, Bit.

Feature image via Pixabay.

A newsletter digest of the week’s most important stories & analyses.