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

MemConfig integration #19

Closed cehteh closed 1 year ago

cehteh commented 1 year ago

I put this in its own branch now. still WIP.

cehteh commented 1 year ago

Actually this can be merged. I'll making new branches/PR's for upcoming changes.

cehteh commented 1 year ago

Note: while this is working fine I am thinking to implement this somewhat differently in future:

One trait per MemConfig thing (Capacity, SegmentSize, SegmentAndOffset, ....). Then ditch the PhantomData. Each of these aspects can then be ZST's or Sized fields (example: Capacity needs only be stored when its costly to recalculate). This can as well give hints to the SegmentCache implementation.

So far this is just a brainfart. I need to play with that idea eventually.

mccolljr commented 1 year ago

Can you change the target branch to master? I will wait until changes have been finalized to push a new tagged version, but I'd like to use that as the main development branch.

mccolljr commented 1 year ago

(I would have done this for you, but I would have had to force-push to a branch in your fork and I didn't feel right about doing that without asking first)

cehteh commented 1 year ago

rebase done, thanks for the plan. I wouldn't mind when you did that.