Skip to main content
A version that redefines concurrency and modernizes the language to meet current challenges
28/11/2025
cubos flotando

In recent years, the IT industry has witnessed a significant shift in the overall landscape of programming languages. These languages evolve each year, as do the needs of clients, programs, and companies. This creates new trends that directly impact how and what is programmed, making it essential to stay informed about the trends that are currently gaining widespread attention.

An important fact is the most popular language at the moment, which for more than five years has taken the title from the long-established and well-known Java to claim the throne to this day: Python, the high-level, general-purpose interpreted language that has been carving out an increasingly larger niche thanks to its power and ease of learning.

Now, with the release of version 3.14 , it brings new features that will help its already notable virtues shine even brighter. Below, we'll discuss the most important of these and how they positively influence language use.

What has become of Python so far?

So far, Python has performed well in many fields. Thanks to its simple syntax and versatile applications, it's a recommended language for both experts and novice programmers, whether for traditional web development or artificial intelligence. Add to that a wide variety of tools in its standard library and a growing, active community, and it almost seems like a perfect language—but nothing could be further from the truth.

While Python boasts numerous advantages, it has suffered from a problem since its inception that directly impacts program concurrency. This problem is known as GIL (Global Interpreter Lock).

And how does this GIL affect things? In Python, each object has a counter that determines how many objects want information about it. When this counter reaches 0, the information is collected by the garbage collector. This methodology helps control how threads use information to avoid inconsistencies or difficulties in understanding it, but nowadays this has become a drawback. On modern computers with multi-core processors, multithreading support is necessary, and the GIL, which only allows one thread to access the Python interpreter at a time, brings more disadvantages than advantages.

Strategies have emerged to address this problem, the most well-known being the multiprocessing library. This library circumvents the issue of running multiple threads in parallel by allowing programmers to create independent processes that run on different system cores. The problem is that these processes come at a cost, as they consume significantly more memory than launching threads and require explicit mechanisms for sharing information, such as queues, pipes, or shared memory. These resource-intensive processes and the added complexity prevent this library from becoming the definitive solution to the main problem of this major language, which is why the current version, 3.14, will address this issue again.

New competition, new possibilities

Now more than ever, the community demands performance without sacrificing simplicity, and Python is taking an important step in the right direction. Ideally, this would involve eliminating the GIL, as it is precisely what causes the problems preventing this change. The problem lies in how the GIL's tasks will be performed once it disappears. And Python already has a solution for this:

  • Biased reference counting: We will no longer be able to use the non-atomic reference counting that GIL had, and using atomic counting is costly and slow. Therefore, a biased reference counting system will be implemented. This system will "lean" each object towards an owning thread that can modify its reference non-atomically, while other threads use atomic operations, maintaining security without sacrificing performance. Furthermore, some common objects, such as True, False, small integers, and interpolated strings, will be marked as immortal, meaning they will never be released, thus eliminating the need for reference counting and reducing the system load.
  • Garbage Collection: Now that the GIL will no longer handle garbage collection automatically, the way garbage is handled has been modified. Instead of immediately removing objects when their reference count decreases, these decreases are recorded in a table that is checked twice, thus preventing the premature removal of objects still in use by other threads. It's important to note that for this process to work correctly, the reference count must remain stable during garbage collection. Therefore, all threads will be paused briefly to ensure that no object's reference count changes during the process.
  • Memory allocation: Replacing pymalloc, another secure, fast, and optimized multithreaded allocator for small objects has emerged. It organizes memory into pages and blocks of the same size, reducing contention and eliminating the need for certain internal locks.

And to see all these changes more clearly, we're going to compare how a
Concurrent code in Python 3.12 compared to the new way of doing it in Python 3.14

A test code will be used as a benchmark that will attempt to calculate prime numbers:

ejemplo código Python

The code responsible for the main calculation does not affect what is being demonstrated, so it will be the same for both versions of Python.

After defining the calculation, it will be performed sequentially:

Ejecución secuencial Python

Sequential execution based on the use of Python 3.12 threads

And also its alternative using Python version 3.14t (where “t” is necessary, since it is version
free-threaded, or in other words, without GIL):

Image
Python 3.14 sin GIL

Unlike the previous one, this one runs with different threads to take advantage of the computation in
Python 3.14 parallel without GIL

 

As a result, we can observe how the version that takes advantage of processing
Multithreading is considerably faster:

Resultado al compilar con Python 3.12

Result of compiling the program with Python 3.12

Resultado al compilar con Python 3.14t

Result of compiling the program with Python 3.14t

It's not all about attendance:

In addition to optimizations for concurrency and the partial elimination of the GIL, Python 3.14 doesn't stop there and brings or consolidates another series of proposals (the so-called PEPs in Python, which are the acronym for Python Enhancement Proposals, used to define new functionalities or proposals within the language) that are worth mentioning:

  • Multiple interpreters in shared memory

    Thanks to the concurrent.interpreters module (PEP 734), interpreters can now be created and managed.
    isolated interpreters within the same process. This allows multi-core parallelism with
    lower cost than using external processes.

  • Deferred evaluation of annotations:

    Type annotations will no longer be evaluated when defining functions, but only when they are
    required (PEP 649). This improves startup performance and reduces overload.

  • Template literals (“t-strings”)

    The new syntax appears with the prefix “t”, similar to f-strings (a way of formatting strings).
    in Python), but it doesn't evaluate directly: instead, it constructs an object representing
    the static and interpolated parts, allowing manipulation of the template before
    evaluate it. (PEP 750)

  • Secure interface for external debuggers

    A new mechanism (PEP 768) is introduced that allows debuggers or profiles to be
    connect to running Python processes without stopping them or adding significant overhead.

  • Compression with Zstandard in the standard library

    The compression.zstd module provides native support for the Zstandard algorithm, which
    It's fast and efficient. Furthermore, modules like tarfile, zipfile, or shutil (with utilities for)
    file management, compressed files and directories) can now work with .zst files. (PEP)
    784)

  • Improved “free-threaded” mode

    The GIL-free mode (“ free-threaded ”, PEP 703) is improved in this version: the following have been eliminated
    Optimizations in the interpreter and the penalty for single-threaded code have been reduced between
    5% and 10%.

  • Improvements to error messages

    Clearer and more helpful messages, with more precise suggestions and warnings, which helps
    There's a lot to debug and understand about common mistakes.

  • Colored syntax in the REPL

    The interactive interpreter (REPL) now has syntax highlighting, which improves the
    readability when writing code directly in the console.

Conclusion:

Python 3.14 demonstrates that the most popular language is not content with what has been achieved so far, but
which continues to evolve to adapt to current challenges. The partial elimination of the GIL, along
With improvements in reference counting, garbage collection, and memory allocation, it opens
the gateway to more efficient and secure concurrency, making better use of processors
multicore.

But it doesn't just focus on concurrency: it offers new features such as multiple
shared-memory interpreters, native compression with Zstandard, and deferred evaluation of
Annotations show how the language continues to grow in performance and ease of use.

In summary, this version consolidates Python as a powerful, versatile, and modern language, capable
by offering both simplicity and performance, and paving the way for developers
Explore new possibilities without sacrificing the ease of learning that has made it so
popular.

Image
imagen rubén

Rubén Gadea
Software Technician
ALTIA