ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.14k stars 439 forks source link

Performance of any_view: non-Input needs small object optimization #454

Open ericniebler opened 8 years ago

ericniebler commented 8 years ago

See discussion in #449. Copying the iterators of an Input any_view does not need to clone the underlying cursor; copies can share a cursor.

CaseyCarter commented 7 years ago

Everything in any_view would also benefit greatly from small object optimizations to avoid tiny dynamic allocations for individual iterators and sentinels.

CaseyCarter commented 7 years ago

After #679:

This leaves two cases that could take advantage of small object optimizations: any_view<T, /* not input */> and its iterators, or more precisely any_cursors.