Mastodon Feed: Post

Mastodon Feed

dysfun@treehouse.systems ("gaytabase") wrote:

incidentally, alternatives to this approach:

  • constantly repacking when you create gaps (fast with masked simd that supports compression, but requires said simd to have the best performance)
  • don't repack ever (but then we have to allocate more often)
  • use a bitmap (to do what? what i'm actually doing but with a need for ctz?)

now, the first option is interesting, it's what we'd do if this were a regular chunked sequence instead of a weird incredibly niche data structure that only has to track refcounts. it would probably even be very fast with the right simd. i don't want to assume that right now, but if i did eagerly repack, it would make it easier to do inter-chunk rearrangement and further stave of allocations.