New Python 3.13 — Improved Performance and Multithreading

watch 1m, 12s
views 2

12:25, 10.10.2024

On October 7, 2024, the stable version of Python 3.13 was released, bringing many significant innovations, including an experimental JIT compiler, a mode without the Global Interpreter Lock (GIL), and an updated interactive interpreter based on PyPy. These improvements aim to enhance the performance and usability of the language. Python 3.13 will be supported for a year and a half, followed by security updates for an additional three and a half years.


One of the key new features is the experimental JIT compiler, which significantly accelerates program execution. To enable JIT in CPython, a build option --enable-experimental-jit has been added, requiring the installation of LLVM. This compiler operates on the Copy-and-Patch architecture, replacing bytecode with machine instructions in real time.


Another addition is the ability to build CPython without GIL. This feature, activated by the --without-gil option, enables parallel code execution on multi-core systems, addressing lock issues in multithreaded environments. However, disabling GIL slightly decreases performance for single-threaded programs, offset by gains in multithreading.


Another important improvement is the updated interactive interpreter, borrowing features from PyPy. It now supports multi-line editing, colored tracebacks, interactive help, and other enhancements for more convenient coding.


Python 3.13 also includes improved handling of local variables in functions and introduces a new typing.TypeIs annotation, and implements other notable changes, including an enhanced version of the mimalloc memory allocation library.

This release marks a significant step forward in Python's development, boosting its performance and opening new possibilities for multithreading and interactive programming.

Share

Was this article helpful to you?

VPS popular offers

-10%

CPU
CPU
3 Epyc Cores
RAM
RAM
2 GB
Space
Space
20 GB NVMe
Bandwidth
Bandwidth
Unlimited
KVM-NVMe 2048 Linux

14.9 /mo

/mo

Billed annually

-9.1%

CPU
CPU
6 Epyc Cores
RAM
RAM
16 GB
Space
Space
150 GB NVMe
Bandwidth
Bandwidth
Unlimited
wKVM-NVMe 16384 Windows

66.5 /mo

/mo

Billed annually

-9.7%

CPU
CPU
10 Xeon Cores
RAM
RAM
64 GB
Space
Space
300 GB SSD
Bandwidth
Bandwidth
Unlimited
wKVM-SSD 65536 Windows

187.5 /mo

/mo

Billed annually

-10%

CPU
CPU
6 Epyc Cores
RAM
RAM
16 GB
Space
Space
150 GB NVMe
Bandwidth
Bandwidth
Unlimited
KVM-NVMe 16384 Linux

60.5 /mo

/mo

Billed annually

-10%

CPU
CPU
6 Xeon Cores
RAM
RAM
8 GB
Space
Space
200 GB HDD
Bandwidth
Bandwidth
300 Gb
KVM-HDD HK 8192 Linux

20.55 /mo

/mo

Billed annually

-16.2%

CPU
CPU
4 Xeon Cores
RAM
RAM
4 GB
Space
Space
50 GB SSD
Bandwidth
Bandwidth
60 Mbps
DDoS Protected SSD-KVM 4096 Linux

67 /mo

/mo

Billed annually

-5.3%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
60 GB HDD
Bandwidth
Bandwidth
300 Gb
wKVM-HDD HK 2048 Windows

11.61 /mo

/mo

Billed annually

-9.7%

CPU
CPU
10 Epyc Cores
RAM
RAM
64 GB
Space
Space
300 GB NVMe
Bandwidth
Bandwidth
Unlimited
wKVM-NVMe 65536 Windows

193 /mo

/mo

Billed annually

-10%

CPU
CPU
4 Xeon Cores
RAM
RAM
4 GB
Space
Space
50 GB SSD
Bandwidth
Bandwidth
Unlimited
KVM-SSD 4096 Linux

15.95 /mo

/mo

Billed annually

-10%

CPU
CPU
10 Xeon Cores
RAM
RAM
64 GB
Space
Space
300 GB SSD
Bandwidth
Bandwidth
Unlimited
KVM-SSD 65536 Linux

181.5 /mo

/mo

Billed annually

Other articles on this topic

Rust 1.79 release
Rust 1.79 release
cookie

Accept cookies & privacy policy?

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the HostZealot website.