歷代 Python 速度的改善

找 Python 速度資訊的時候找到「Sixteen Years of Python Performance」這篇,看起來作者有一直在更新,最新的圖有放上 3.14 (四月寫的當時是 3.14a3,今年十月的時候出 3.14.0 了) 的資訊。 很久前 Python 3 為人詬病的點就是速度比 Python 2 慢,從 2008 年的 3.0 要一路到 2018 年的 3.7 才超越本來的 2.7,後面在 3.

Gea-Suan Lin's BLOG

Python 3.13 的 free-threading mode 以及 no GIL mode

前幾天看到「State of Python 3.13 performance: Free-threading (codspeed.io)」這篇,在講 Python 3.13 的 free-threading mode & no GIL mode 的效能:「State of Python 3.13 Performance: Fre

https://blog.gslin.org/archives/2024/11/08/12061/python-3-13-%e7%9a%84-free-threading-mode-%e4%bb%a5%e5%8f%8a-no-gil-mode/

#Computer #Murmuring #Programming #Software #free #gil #mode #multi #no #performance #programming #py #py3 #python #python3 #thread #threading

Python 3.13 的 free-threading mode 以及 no GIL mode

前幾天看到「State of Python 3.13 performance: Free-threading (codspeed.io)」這篇,在講 Python 3.13 的 free-threading mode & no GIL mode 的效能:「State of Python 3.13 Performance: Free-Threading」。 從這張圖可以看到一些資訊: 首先是 Python 3.

Gea-Suan Lin's BLOG

離跟 GIL 說再見更進一步的 Free-threaded CPython

在「Free-threaded CPython is ready to experiment with (quansight.org)」這邊看到 Python 拔 GIL 的進度,從原文「Free-threaded CPython is ready t

https://blog.gslin.org/archives/2024/07/13/11884/%e9%9b%a2%e8%b7%9f-gil-%e8%aa%aa%e5%86%8d%e8%a6%8b%e6%9b%b4%e9%80%b2%e4%b8%80%e6%ad%a5%e7%9a%84-free-threaded-cpython/

#Computer #Murmuring #Programming #Software #gil #global #interpreter #lock #performance #py #py3 #python #python3 #thread #threading

離跟 GIL 說再見更進一步的 Free-threaded CPython

在「Free-threaded CPython is ready to experiment with (quansight.org)」這邊看到 Python 拔 GIL 的進度,從原文「Free-threaded CPython is ready to experiment with!」這邊可以看到有些需要套件一起配合的,像是 NumPy 這邊的「BUG: error Python 3.

Gea-Suan Lin's BLOG

Today, I stumbled upon a #python / #pyresample tutorial I had made for @oceanographer 's #earthpy back in 2013 😄 . These were my early #python and #notebook days...

It seems quite valid today, except for the py2.7 syntax and the use of Basemap.

Should I post an update with #cartopy and #py3 ?

http://earthpy.org/interpolation_between_grids_with_pyresample.html

Interpolation between grids with pyresample

Pour nettoyer un dossier de code .py des en-têtes « coding: utf-8 » issus de l'époque Python 2

# Headers « coding: utf-8 »
find -name '*.py' -exec sed -i '1{/#*coding: utf-8/d;}' {} \;
# Lignes vides en tête de fichier
find -name '*.py' -exec sed -i '1{/^\#\?$/d;}' {} \;

#Py3 #OneLiner #sed #CLI