XY Python Library

It is hard to get impressed by libraries, too many new, too many often. XY got me. Python charting, Rust core, and the number that stopped me is in their benchmark table: 1M points renders in 0.084 s, 100M points in 0.081 s. That’s not a speedup, it’s a flat line across two orders of magnitude, the 100M case is marginally faster than the 1M one. What that flatness tells you is that render cost has stopped being O(N). Above ~200k rows XY quits drawing one marker per row and computes a density surface in Rust, bounded by your screen resolution: cost tracks pixels, not rows. The residual ~80 ms is fixed overhead, build the spec, ship typed binary buffers instead of JSON, land a stable frame. Every exact-marker path scales the way you’d expect; Matplotlib crosses a second around 3M, Plotly around 2.5M.

The obvious objection is that aggregation is a lie you tell your users. XY’s answer is that canonical f64 columns stay in Python, so zoom re-runs the same pipeline over the new range and drills back to exact rows, and a selection returns the original rows. They also published the density=False line with same engine and no aggregation credit, 100M exact markers in 1.34 s! Well, take with a grain salt because it’s only version 0.0.4, nevertheless it is promising for a stuff we use a lot

https://github.com/reflex-dev/xy