mccolljr / segvec

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

add `extend_from_slice` method #41

Closed vxpm closed 10 months ago

vxpm commented 11 months ago

adds an extend_from_slice method to SegVec (and fixes a small bug in extend - it was reserving elements twice).

needed for acceptable performance in #40

vxpm commented 10 months ago

it's alright! nothing urgent. i'm currently not using this crate actively on any projects - i just think this is a good, useful data structure and want to help it get faster & closer to feature parity with good old Vec. i might be using it soon, though, so do expect some more PRs in this end of year.

vxpm commented 10 months ago

i believe it's all good now :) edit: by the way, fixing the unsoundness in extend seems to have impacted performance positively - not sure why, but that's very welcome.

mccolljr commented 10 months ago

Awesome, thanks for the changes. Merged!