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

-4.5%

CPU
CPU
4 Xeon Cores
RAM
RAM
4 GB
Space
Space
100 GB HDD
Bandwidth
Bandwidth
300 Gb
wKVM-HDD HK 4096 Windows

17 /mo

/mo

Billed annually

-5.6%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
60 GB HDD
Bandwidth
Bandwidth
Unlimited
wKVM-HDD 2048 Windows

13.7 /mo

/mo

Billed annually

CPU
CPU
6 Epyc Cores
RAM
RAM
8 GB
Space
Space
100 GB NVMe
Bandwidth
Bandwidth
Unlimited
Keitaro KVM 8192
OS
CentOS
Software
Software
Keitaro
/mo

Billed monthly

-20.8%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
150 GB SSD
Bandwidth
Bandwidth
10 TB
wKVM-SSD 16384 Metered Windows

100 /mo

/mo

Billed annually

-5.9%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
75 GB SSD
Bandwidth
Bandwidth
Unlimited
wKVM-SSD 2048 Windows

14.8 /mo

/mo

Billed annually

-10%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
60 GB HDD
Bandwidth
Bandwidth
Unlimited
KVM-HDD 2048 Linux

7.7 /mo

/mo

Billed annually

-10.1%

CPU
CPU
3 Xeon Cores
RAM
RAM
1 GB
Space
Space
40 GB HDD
Bandwidth
Bandwidth
300 Gb
KVM-HDD HK 1024 Linux

4.97 /mo

/mo

Billed annually

-10%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
150 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-KVM-SSD 16384 Linux

231 /mo

/mo

Billed annually

-7.9%

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

25.95 /mo

/mo

Billed annually

-5%

CPU
CPU
3 Xeon Cores
RAM
RAM
1 GB
Space
Space
40 GB HDD
Bandwidth
Bandwidth
Unlimited
wKVM-HDD 1024 Windows

12.1 /mo

/mo

Billed annually

Other articles on this topic

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.