Performance
13 posts
Deduplicating the Result Is Not Deduplicating the Work
A graph walk that collects into a set returns correct output while still enumerating every path. Why a visited set and an accumulator are two different things.
Validate At the Lowest Public Boundary
A Python wrapper that validates its arguments is not validation if the C extension underneath is importable. Anything importable is public API.
Cache Keys Must Come From the Resolved Call
A memoization decorator that reads kwargs cannot see positional arguments, so distinct calls collide. How to build keys from the bound signature instead.
Into the C: Making PyGeoHash Decode Twice as Fast
Last time I optimized the Python wrapper around PyGeoHash. This time I went into the C extension and found it was building objects it immediately threw away.
Optimizing PyGeoHash Without Touching the C
A few days after benchmarking PyGeoHash against the field, I closed most of the gap to the C++ library without writing any C. Here is how.
Benchmarking PyGeoHash: Where It Lands Against the Field
I benchmarked PyGeoHash against six Python geohash libraries with pytest-benchmark. It trails the Rust and C++ options and beats pure Python by a mile.
The Passive Resistance Problem: When Good Employees Go Quiet
How to recognize and address the subtle but devastating pattern when long-term employees comply with directives but stop delivering meaningful results.
PyGeoHash v3.0.0: Faster, Freer, and More Pythonic
Deep dive into PyGeoHash v3.0.0: a major release with a pure CPython rewrite, MIT relicensing, and dramatic performance gains. Faster & freer geohashing!
Where Did All the RAM Go? Memory Profiling with Memray
High CPU isn''t the only performance issue. Learn how Memray helps track memory leaks and excessive allocation in your Python library to optimize usage.
Finding the Slowdown: Profiling Python Code with Pyinstrument
Your benchmark says a function is slow, but why? Profilers like Pyinstrument help you pinpoint exactly where your Python code is spending its time.