#Py

2025-05-15

Am I correct in finding that the Python runtime can't schedule multiple threads across multiple CPU cores?

As an example:

```
from concurrent.futures import ThreadPoolExecutor as PoolExecutor
def fn(lst) -> int:
# do something computationally expensive
with PoolExecutor(max_workers=10) as executor:
total = sum(executor.map(fn, lst))
```

This code (with the stub filled out appropriately) runs on a single core of my 10-core M1 Pro CPU, and the results are no faster than the synchronous version of the code.

My version info:

Python 3.13.1 (v3.13.1:06714517797, Dec 3 2024, 14:00:22) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin

PyCharm 2025.1
Build #PY-251.23774.444, built on April 14, 2025
Runtime version: 21.0.6+9-b895.109 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

MacBook Pro 14-inch, 2021
Chip: Apple M1 Pro
Memory: 32 GB
macOS Sequoia 15.4.1

#Python

Japan Pop Newsnews@wakoka.com
2025-04-20

wacoca.com/news/2505205/ パラグアイが中国外交官を追放、台湾との関係巡り「内政干渉」 | ロイター #AMERS #Asia #ASXPAC #CIV #CN #DEST:NOJPTPM #DEST:NOJPWDM #DEST:NOJPZTM #dip #EASIA #EMRG #Gen #IMM #JFOR #JLN #LATAM #POL #PXP #PY #SAMER #Taiwan #TOPCMB #TOPNWS #TRN #TW #台湾

パラグアイが中国外交官を追放、台湾との関係巡り「内政干渉」 | ロイター
2025-04-04

欧州11カ国がメルコスルとのFTA締結に向け協議、米関税で方針転換か | ロイター yayafa.com/2264958/ #AGRI #AMERS #AR #Br #cơm #DEST:NOJPWDM #EMEA #EMRG #EU #EUROP #EZC #FR #Gen #INTAG #JFOR #JLN #LATAM #NAMER #News #POL #PY #SAMER #TOPCMB #TOPNWS #TRD #TRF #TRN #us #WEU #World #WorldNews #ニュース #世界 #世界ニュース

欧州11カ国がメルコスルとのFTA締結に向け協議、米関税で方針転換か | ロイター
Japan Pop Newsnews@wakoka.com
2025-04-04

wacoca.com/news/2491869/ 欧州11カ国がメルコスルとのFTA締結に向け協議、米関税で方針転換か | ロイター #AGRI #AMERS #ar #BR #com. #DEST:NOJPWDM #EMEA #EMRG #EU #EUROP #Europe #EuropeanUnion #EZC #fr #Gen #INTAG #JFOR #JLN #LATAM #NAMER #POL #PY #SAMER #TOPCMB #TOPNWS #TRD #TRF #TRN #US #WEU #ヨーロッパ #欧州 #欧州連合

欧州11カ国がメルコスルとのFTA締結に向け協議、米関税で方針転換か | ロイター
Japan Pop Newsnews@wakoka.com
2025-03-29
EUと南米、FTAで合意 発効手続きは難航の可能性 | ロイター
Dark*:*Star :antifa:admin@astronomy.social
2025-03-14

Wörter mit π …

πthon

#py #pi

Abdullah1xcoder
2025-02-17

🐍 Python in One Minute 😮

Python is one of the most versatile, powerful, and beginner-friendly programming languages out there! Whether you're building web applications, automating tasks, or diving into data science and AI, Python has you covered. With its clean and readable syntax, Python allows developers to bring ideas to life quickly and efficiently. 🚀

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst