Polars 2.0 parses 1M dates 25x faster than lru_cache in Mac mini benchmark
A hands-on benchmark run on a Mac mini M4 Pro with Python 3.14 compared three approaches to parsing one million date strings: a plain script, an lru_cache trick, and Polars 2.0.0-rc.1. The cache method delivered roughly 3x speedup over the baseline but only when input dates repeated, and was actually 6% slower than doing nothing on fully unique inputs. Polars 2.0 completed the same task in 0.13 seconds end-to-end — about 25 times faster than the cached version — regardless of whether dates repeated. A separate re-run of the uv package installer at version 0.12.11 showed it remains around 6-7x faster than pip, with only a 4% improvement over the previous 0.11.6 version. The author notes Polars 2.0 is still a release candidate and recommends rechecking results once the final version ships.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in