Note
- Benchmark code performs factorial calculations
OS | CPU | RAM | Python |
---|---|---|---|
Ubuntu 22.04 | Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz |
8GB | 3.10.16, 3.13.1t |
Note
- GIL deactivation of
Python 3.13
seems to be less optimized thanpypy
orcython
yet
-
Create Python 3.10, Python 3.13 environments with Anaconda and pyenv
# Python 3.10 conda create -n bechpy3.10 python=3.10 # Python 3.13 pyenv install 3.13.1t
Tip
Python 3.13.1t
has GIL disabled by default and can be turned on through arguments
Important
- Please make sure it's a
Python 3.13
environment
python GIL_check.py
Tip
- If the output is
False
, GIL is disabled
python bench.py
Important
- Please make sure it's a
Python 3.13
environment
python -X gil=1 bench.py
Tip
-X gil=1
argument activates GIL- In
Python 3.13.1t
, GIL is inactive by default and can be specified asgil=0
Important
- Please make sure it's a
Python 3.10
environment
python bench.py