You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lazy_sequence's implementation uses runtime::{first,next,next_in_place} to traverse the inner seq, paying the cost of visit_seqable each step even though we know the inner seq's type once we call resolve_seq().
One idea might be to have resolve_seq() also cache the member functions of these operation as lambdas so the calls can be made directly.
Another seq container class cons is a little different. Unlike lazy_sequence::next(), cons::next() returns the inner collection. This means the subsequent runtime::next() call won't need to also go through cons::next().
lazy_sequence
's implementation usesruntime::{first,next,next_in_place}
to traverse the inner seq, paying the cost ofvisit_seqable
each step even though we know the inner seq's type once we callresolve_seq()
.One idea might be to have
resolve_seq()
also cache the member functions of these operation as lambdas so the calls can be made directly.I'm also curious if there are other classes that have even longer "seq nesting".
The text was updated successfully, but these errors were encountered: