PythonHub
2.47K subscribers
2.35K photos
49.6K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
"Enabling" C threads in a Python / Wasm environment

The author details the significant hurdles of implementing high-performance C++ multithreading within a Pyodide (Python on WebAssembly) environment, specifically for real-time applications where Python's GIL and FFI overhead are too slow. His solution involves a custom-patched Pyodide built with -pthread and a specialized C++ thread pool that avoids deadlocks by using low-level Wasm buil...

https://yosefk.com/blog/enabling-c-threads-in-a-python-wasm-environment.html
Auto updating knowledge graph from meeting notes

Build a meeting knowledge graph from Google Drive using LLM extraction and graph database, with automatic continuous updates.

https://github.com/cocoindex-io/meeting-notes-knowledge-graph
randomized-svd

randomized-svd is a lightweight, high-performance Python library for computing the Randomized Singular Value Decomposition (rSVD).

https://github.com/massimofedrigo/randomized-svd
What async really means for your python web app?

The author challenges the hype around async Python, demonstrating through benchmarks that for most database-driven web apps, synchronous Django with connection pooling often outperforms or matches async alternatives. The study concludes that unless a service is highly distributed or the primary bottleneck, the overhead of async can actually degrade performance, making sync the more effic...

https://hackeryarn.com/post/async-python-benchmarks/
👍2
Static Protocols in Python: Behaviour Over Inheritance

Patrick Müller explores how Python's static protocols enable "static duck typing," allowing developers to define interfaces based on behavior (structural typing) rather than inheritance (nominal typing). He argues that this approach promotes loose coupling and greater flexibility in software design, particularly in complex fields like machine learning where diverse libraries and coding s...

https://patrickm.de/static-protocols-in-python/
How uv got so fast

uv's speed comes from engineering decisions, not just Rust. Static metadata, dropping legacy formats, and standards that didn't exist five years ago.

https://nesbitt.io/2025/12/26/how-uv-got-so-fast.html
Unit testing your code’s performance, part 1: Big-O scaling

Your software’s speed needs some form of testing; big-O scaling is a good starting point.

https://pythonspeed.com/articles/big-o-tests/
Recent optimizations in Python's Reference Counting

CPython 3.14+ introduced LOADFASTBORROW, a bytecode optimization that skips reference count increments when loading local variables in hot loops, using static lifetime analysis to ensure safety. This reduces memory management overhead in performance-critical code like tight loops, mimicking Rust-style borrowing while preserving Python's reference counting model, with further JIT optimi...

https://rushter.com/blog/python-refcount/