Python⇒Speed
Helping you deploy with confidence, ship higher quality code, and speed up your application.
- Posts
- 100 from 4 Sep 2018 to 2 Aug 2026
- Posting
- monthly (6 in the last year)
- Kind
- personal blog
- Feed
- https://pythonspeed.com/atom.xml
2026 6
- Faster floating point math with Rust’s new API
- 8× faster binary search: from compiled code to mechanical sympathy
- Timesliced reservoir sampling: a new(?) algorithm for profilers
- Unit testing your code’s performance, part 2: Catching speed changes
- Speeding up NumPy with parallelism
- Unit testing your code’s performance, part 1: Big-O scaling
2025 5
2024 8
- Using portable SIMD in stable Rust
- Beyond multi-core parallelism: faster Mandelbrot with SIMD
- Let’s build and optimize a Rust extension for Python
- Let’s optimize! Running 15× faster with a situation-specific algorithm
- Not just NVIDIA: GPU programming that runs everywhere
- Profiling your Numba code
- Beware of misleading GPU vs CPU benchmarks
- NumPy 2 is coming: preventing breakage, updating your code
2023 17
- How many CPU cores can you actually use in parallel?
- Using Polars in a Pandas world
- Two kinds of threads pools, and why you need both
- Speeding up Cython with SIMD
- Speeding up your code when multiple cores aren’t an option
- The easiest way to speed up Python with Rust
- When NumPy is too slow
- Understanding CPUs can help speed up Numba and NumPy code
- Choosing a good file format for Pandas
- Goodbye to Flake8 and PyLint: faster linting with Ruff
- Polars for initial data analysis, Polars for production
- Speeding up text processing in Python (is hard)
- Python’s multiprocessing performance problem
- Don’t bother trying to estimate Pandas memory usage
- The problem with float32: you only get 16 million values
- Some reasons to avoid Cython
- Why Polars uses less memory than Pandas
2022 19
- Who controls parallelism? A disagreement that leads to slower code
- Good old-fashioned code optimization never goes out of style
- Early speed optimizations aren’t premature
- Find slow data processing tasks (before your customers do)
- Invasive procedures: Python affordances for performance measurement
- Finding performance problems: profiling or logging?
- The best way to find performance bottlenecks: observing production
- The limits of Python vectorization as a performance technique
- Finding performance bottlenecks in Celery tasks
- Pandas vectorization: faster code, slower code, bloated memory
- CPUs, cloud VMs, and noisy neighbors: the limits of parallelism
- Faster, more memory-efficient Python JSON parsing with msgspec
- When Python can’t thread: a deep-dive into the GIL’s impact
- Faster hardware is a bad first solution to slow software
- Processing large JSON files in Python without running out of memory
- Faster Python calculations with Numba: 2 lines of code, 13× speed-up
- The fastest way to read a CSV in Pandas
- How vectorization speeds up your Python code
- Memory location matters for performance
2021 12
- Creating a better flamegraph visualization
- Cython, Rust, and more: choosing a language for Python extensions
- NumPy views: saving memory, leaking memory, and subtle bugs
- Saving memory with Pandas 1.3’s new string dtype
- Measuring the memory usage of a Pandas DataFrame
- Measuring memory usage in Python: it’s tricky!
- Docker can slow down your code and distort your benchmarks
- The hidden performance overhead of Python C extensions
- Loading SQL data into Pandas without running out of memory
- Transgressive Programming: the magic of breaking abstractions
- All Pythons are slow, but some are faster than others
- Dying, fast and slow: out-of-memory crashes in Python
2020 16
- CI for performance: Reliable benchmarking in noisy environments
- Optimizing your code is not the same as parallelizing your code
- The mmap() copy-on-write trick: reducing memory usage of array copies
- Estimating and modeling memory requirements for data processing
- Debugging Python server memory leaks with the Fil profiler
- Too many objects: Reducing memory overhead from Python instances
- Massive memory overhead: Numbers in Python and how NumPy helps
- Clinging to memory: how Python function calls can increase memory use
- Debugging Python out-of-memory crashes with the Fil profiler
- Fil: a Python memory profiler for data scientists and scientists
- From chunking to parallelism: faster Pandas with Dask
- Fast subsets of large datasets with Pandas and SQLite
- Loading NumPy arrays from disk: mmap() vs. Zarr/HDF5
- Reducing Pandas memory usage #3: Reading in chunks
- The Parallelism Blues: when faster code is slower
- Copying data is wasteful, mutating data is dangerous
2019 16
- Reducing NumPy memory usage with lossless compression
- Reducing Pandas memory usage #2: lossy compression
- Reducing Pandas memory usage #1: lossless compression
- When your data doesn’t fit in memory: the basic techniques
- Beyond cProfile: Choosing the right tool for performance optimization
- Not just CPU: writing custom profilers for Python
- Where’s your bottleneck? CPU time vs wallclock time
- Speed is situational: two websites, two orders of magnitude
- Logging for scientific computing: debugging, performance, trust
- Choosing a faster JSON library for Python
- When C extensions crash: easier debugging for your Python application
- Realistic, easy, and fast enough: database tests with Docker
- When your CI is taking forever on AWS, it might be EBS
- Stuck with slow tests? Speed up your feedback loop
- Why Pylint is both useful and unusable, and how you can use it
- Fast tests for slow services: why you should use verified fakes