More Ranges Please
summary
Proposes concrete range additions: a merge view and views for set_union/set_intersection that accept many sorted inputs and perform lazy multiway merge, cutting work from O(S·P log(S·P)) to about O(S log P); use nth_element to avoid full sorts for “top K”, yielding average linear time. Suggests a sorted_range concept (and assume_sorted/is_sorted helpers), a histogram view built from chunk_by_equal+transform, and an order permutation view that emits a sorting permutation to avoid expensive swaps by applying a lazy permutation. Inspirations: ranges V3 and D library; pending PRs.
AI-written summary · about
