Skip to content
Opensource internals
  • Posts

Polars

Polars Releases the GIL Before It Does Any Real Work

Oct 21, 2026 12 min read Jay Hubbert

Every public py-polars entry point wraps its work in enter_polars, which calls pyo3’s Python::detach to drop the GIL. The GIL is re-acquired with Python::attach at exactly one …

PolarsInternalsPythonConcurrencyPerformance

Read more →

Polars Estimates Cardinality With HyperLogLog

Oct 21, 2026 17 min read Jay Hubbert

The HyperLogLog register trick turns a 64-bit hash into an index and a rank, and Polars’ estimator replaces the classic bias correction with Ertl’s tau/sigma correction; a second, …

PolarsInternalsJoinsGroup by

Read more →

Polars Finds the Top K With a Bounded Heap

Oct 21, 2026 12 min read Jay Hubbert

The streaming engine keeps one BinaryHeap of k keys per pipeline, admits a key only if it is strictly below the current threshold, merges the per-pipeline heaps pairwise at the …

PolarsInternalsStreamingPerformance

Read more →

Polars Sorts Floats the Way Nobody Wants Them Sorted

Oct 21, 2026 16 min read Jay Hubbert

TotalOrd is Polars’ own total order for floats: all NaNs compare equal and NaN is the maximum, -0.0 and 0.0 are indistinguishable, and hashing canonicalises both so equality and …

PolarsInternalsSortingPerformance

Read more →

Polars Parses JSON Without Building a DOM

Oct 21, 2026 12 min read Jay Hubbert

Polars’ JSON reader parses a line into simd-json borrowed values that point into the source buffer, then pushes each field into the matching column builder; no DOM is allocated and …

PolarsInternalsPerformanceMemoryStrings

Read more →

← Newer Page 2 of 7 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·