Better HN
topnewbestaskshowjobs
Log inSign up

fantasai

9 karma · joined Apr 23, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

Quadratic performance is a bit of an exaggeration. It's not O(N_items^2). It's N_tracks x N_items, and basically nobody has N_tracks ≈ N_items. Practically speaking, the upper limit is closer to (N_items^1.5) because N_tracks is unlikely to go over sqrt(N_items) in cases where N is large. And almost all of those layouts will have repetitive track sizing patterns, so they can be optimized to a much smaller N_tracks that approaches O(N_items).