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

-20.4%

CPU
CPU
2 Xeon Cores
RAM
RAM
2 GB
Space
Space
30 GB SSD
Bandwidth
Bandwidth
300 GB
KVM-SSD 2048 HK Linux

18 /mo

/mo

Billed annually

-29.4%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
30 GB SSD
Bandwidth
Bandwidth
2 TB
KVM-SSD 2048 Metered Linux

17 /mo

/mo

Billed annually

-20.5%

CPU
CPU
6 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
8 TB
KVM-SSD 8192 Metered Linux

57 /mo

/mo

Billed annually

CPU
CPU
4 Epyc Cores
RAM
RAM
4 GB
Space
Space
50 GB NVMe
Bandwidth
Bandwidth
Unlimited
Keitaro KVM 4096
OS
CentOS
Software
Software
Keitaro
/mo

Billed monthly

CPU
CPU
6 Epyc Cores
RAM
RAM
16 GB
Space
Space
150 GB NVMe
Bandwidth
Bandwidth
Unlimited
Keitaro KVM 16384
OS
CentOS
Software
Software
Keitaro
/mo

Billed monthly

-13.1%

CPU
CPU
2 Xeon Cores
RAM
RAM
512 MB
Space
Space
10 GB SSD
Bandwidth
Bandwidth
300 GB
KVM-SSD 512 HK Linux

7 /mo

/mo

Billed annually

-10%

CPU
CPU
8 Xeon Cores
RAM
RAM
32 GB
Space
Space
200 GB SSD
Bandwidth
Bandwidth
Unlimited
KVM-SSD 32768 Linux

93.5 /mo

/mo

Billed annually

-8.4%

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

37.4 /mo

/mo

Billed annually

-10%

CPU
CPU
8 Xeon Cores
RAM
RAM
32 GB
Space
Space
200 GB SSD
Bandwidth
Bandwidth
12 TB
KVM-SSD 32768 Metered Linux

150 /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.63 /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.