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
zip_eq kills performance pretty well, so I've been uncomfortable with it. We could change it around to use exact size iterators and check up front, but that also makes them less useful, doesn't it? Any thoughts on this?
I wouldn't really have expected it to work with non-ExactSizeIterators. For me it's simply a nice additional assertion (which has already caught one bug for me where I accidentally refered to a wrong slice).
Aha. For example filtering will make an iterator non-ESI and I can imagine that's exactly when zip_eq is needed, if equal length is the assumption.
Maybe we can give update the "contract" of it to allow it to panic up front, for exact size iterators, but otherwise defer to late checking? That would still "kill" performance until specialization is available, though.
Seems the only reason this doesn't exist is that nobody has done it yet. Should I make a PR?
The text was updated successfully, but these errors were encountered: