Cheuk Ting Ho
Developer advocate / Data Scientist - support open-source and building the community.
Get the slides at slides.com/cheukting_ho/trying-no-gil/
Generate first 25 numbers in Fibonacci sequence
- Average over 50 times
No GIL | CPython 3.9 | CPython 3.11 |
---|---|---|
0.0242614s | 0.0452114s | 0.0275933s |
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
Significant improvement from 3.9
A bit better than 3.11
No GIL | CPython 3.9 | CPython 3.11 |
---|---|---|
0.0327320s | 0.0319601s | 0.0295781s |
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
No significant difference
We use A demo of K-Means clustering on the handwritten digits data - Average over 50 times
No GIL | CPython 3.9 | CPython 3.11 | |
---|---|---|---|
k-means++ | 0.230s | 0.176s | 0.188s |
random | 0.032s | 0.024s | 0.025s |
PCA-based | 0.015s | 0.012s | 0.012s |
No significant difference (or worse)
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
We use the Iris data set in Plot the decision surface of decision trees trained on the iris dataset
- averaging all pairs of features
No GIL | CPython 3.9 | CPython 3.11 |
---|---|---|
0.397881ms | 0.6451607ms | 0.6741285ms |
🥇 | 🥈 | 🥉 |
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
No GIL | CPython 3.9 | CPython 3.11 | |
---|---|---|---|
SVD | 0.263492s | 0.242731s | 0.265867s |
Norm | 0.0235930s | 0.0198416s | 0.0237444s |
Transpose | 1.759529µs | 1.850128µs | 1.974106µs |
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
No GIL | CPython 3.9 | CPython 3.11 | |
---|---|---|---|
Laplacian-Gaussian | 0.0335324s | 0.0298902s | 0.0309711s |
Gaussian gradient magnitude | 0.0711931s | 0.0638475s | 0.0655634s |
Sobel filter | 0.0835007s | 0.0739401s | 0.0758417s |
Canny filter | 0.0701143s | 0.0669602s | 0.0633507s |
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
We use Compare Stochastic learning strategies for MLPClassifier
- Average over 10 times
No GIL | CPython 3.9 | CPython 3.11 |
---|---|---|
3.25005s | 2.72408s | 2.61342s |
🥉 | 🥈 | 🥇 |
* run on GitHub Action ubuntu-latest (Ubuntu 22.04) with 2 cores
By Cheuk Ting Ho
Developer advocate / Data Scientist - support open-source and building the community.