mccolljr / segvec

SegVec data structure for rust. Similar to Vec, but allocates memory in chunks of increasing size.
MIT License
33 stars 4 forks source link

Iterator/Slice improvements #27

Closed cehteh closed 1 year ago

cehteh commented 1 year ago

Turns out that I'll need a IterMut as well, thus I started with some cleanup and implementing the missing bits on Slice iterators. WIP still.

Done:

Upcoming:

cehteh commented 1 year ago

Mostly finished, needs some (self-)review and cleanup.

Slice iterators (immutable and mutable) are now apparently faster than std Vec iterators. They are still slightly slower than SegVec Iter (prolly because the size_hint accounting?).

cehteh commented 1 year ago

Rebased on master, the 'FromIter' are not part of this as noted in https://github.com/mccolljr/segvec/pull/26#issuecomment-1620346517 I 'Ready for merge' this now without both 'From/FromIter' bits, pending the decision for later and another PR.