TLDRocket
Sign in

Polars 2.0 pre-release comes with a 5x speed boost — but it could change row order

The New Stack Meredith Shubel

Polars 2.0 turns on a faster streaming engine by default. Good for memory and speed; bad if your code cares about row order.

Based on reporting by The New Stack, Meredith Shubel — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Polars is pushing its 2.0 release candidate with a big promise: faster queries and less memory pain for people wrestling with large tables. The open-source data library says the new default for LazyFrame.collect will use its streaming engine, which should make many queries run better and avoid out-of-memory headaches.

The catch is baked into the upgrade. Polars says the streaming engine does not guarantee row order for some operations, including join, group_by, and unpivot. That matters because plenty of downstream code quietly assumes rows will come back in the same order every time. The company even flags the migration risk in a red danger box in its 2.0-rc user guide, warning that the change may silently affect pipeline results.

There is a tradeoff here, and Polars is being unusually blunt about it. The streaming engine works in batches instead of processing everything at once, which is how it can handle datasets that do not fit into available memory. In aggregate, Polars says it can be “easily 5x faster,” though that gain can come with changed row ordering. Users who need stability can sort explicitly, use maintain_order=True where that applies, or keep the in-memory engine as the default by setting engine affinity.

The pre-release is not just about the engine switch. Polars 2.0 also removes many ambiguous casts and pushes users toward a clearer API, including .str.to_date() and .str.to_datetime() for parsing strings into temporal types. The company says it does not gate new features, so it ships them as soon as they are ready. More is already teased for 2.x: a new IO-plugin design, a faster S3 reader, a cost-based planner, join reordering, and broader SQL coverage.

My take — AI-written commentary, not fact-checked reporting

This is the right kind of breaking change: honest, useful, and a little rude to sloppy code. Too many data tools sell speed as if order were a law of nature; Polars is basically saying, no, pick one. That’s healthier than pretending the old defaults were magic.

Read more about this at: The New Stack

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.