-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Description
Now that Iterator
has re-emerged as a single trait, it's possible to override default methods like count
, last
and nth
for iterators on slices, vectors, and so on. We should audit the applicable iterators and take advantage of overrides when possible.
libcore:
- slice::Iter(Mut): count, last, nth
- slice::Windows: count, last, nth O(1) count,nth,last for slice::{Windows,Chunks,ChunksMut} #27652
- slice::Chunks(Mut): count, last, nth O(1) count,nth,last for slice::{Windows,Chunks,ChunksMut} #27652
- char::{EscapeDefault, EscapeUnicode}: count, last, nth (techically but probably not worth it)
- str::Bytes: count, last, nth
- iter::Chain: count, last, nth
- iter::Enumerate: count, nth
- iter::Peekable: count, last, nth
- iter::Skip: count, last, next (should call nth), nth
- iter::Take: nth
- iter::Fuse: count, last, nth
schneiderfelipe
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.