Tag: performance
-
FastAPI vs Flask Async: Cut ML Inference Latency 48%
FastAPI cut ML API latency 48% vs Flask โ but naive async made it worse. Real benchmarks, async patterns, and the threading pitfall that cost me an hour.
-
Hash Table Collisions: Chaining vs Open Addressing in Python
Compare hash table collision strategies in Pythonโchaining vs open addressing. See benchmarks, implementation tricks, and when each wins.
-
HashMap vs Set: Dict Lookups Beat In-Memory Search by 47x
Dict lookups beat list search by 47x in this 100k-element test. But tiny datasets flip the winner โ see the break-even point with benchmarks.
-
GitHub Actions vs GitLab CI: Cache Speed at 2.1s vs 8.4s
GitHub Actions vs GitLab CI cache speed test: 2.1s vs 10.5s for 400MB node_modules. Real benchmarks, compression tricks, Docker layer caching.
-
LLM Context Windows: Why 128K Tokens Break at 50K
Discover why LLM context windows fail before their limits and learn proven techniques to maximize token usage in production applications.
-
Python slots=True: 8x Memory Cut in 10M Dataclass Instances
Cut Python memory usage by 87% with slots=True in dataclasses. Real benchmark: 10 million instances, 8x efficiency gain, zero code complexity added.
-
gc.collect() Slows Python 32%: When Manual GC Hurts
Manual gc.collect() slowed my pipeline 32%. Here's when Python's GC heuristics beat your intuition โ and the rare cases where you should override them.