Python in 2024: Faster, More Powerful, and More Popular Than Ever


“Over the course of 2024, Python has proven again and again why it’s one of the most popular, useful, and promising programming languages out there,” writes InfoWorld:

The latest version of the language pushes the envelope further for speed and power, sheds many of Python’s most decrepit elements, and broadens its appeal with developers worldwide. Here’s a look back at the year in Python.

In the biggest news of the year, the core Python development team took a major step toward overcoming one of Python’s longstanding drawbacks: the Global Interpreter Lock or “GIL,” a mechanism for managing interpreter state. The GIL prevents data corruption across threads in Python programs, but it comes at the cost of making threads nearly useless for CPU-bound work. Over the years, various attempts to remove the GIL ended in tears, as they made single-threaded Python programs drastically slower. But the most recent no-GIL project goes a long way toward fixing that issue — enough that it’s been made available for regular users to try out.

The no-GIL or “free-threaded” builds are still considered experimental, so they shouldn’t be deployed in production yet. The Python team wants to alleviate as much of the single-threaded performance impact as possible, along with any other concerns, before giving the no-GIL builds the full green light. It’s also entirely possible these builds may never make it to full-blown production-ready status, but the early signs are encouraging.

Another forward-looking feature introduced in Python 3.13 is the experimental just-in-time compiler or JIT. It expands on previous efforts to speed up the interpreter by generating machine code for certain operations at runtime. Right now, the speedup doesn’t amount to much (maybe 5% for most programs), but future versions of Python will expand the JIT’s functionality where it yields real-world payoffs.

Python is now more widely used than JavaScript on GitHub (thanks partly to its role in AI and data science code).



Source link