Mastodon Feed: Post

Mastodon Feed

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

i would like to see some actual figures at some point though. i came up with a new amortisation technique and i have no idea how well it will work out in practice (i'm fairly sure it's good enough, but i want to know if it's really good)

amortisation: refcounts are stored in 32-way chunks. for each chunk, min and max indexes are stored. when either the first or last item is removed (refcount = 0), we adjust the range by skipping over any zero-refcounted items, so it's creeping up at the low end and down at the high end. i don't think i've ever seen this particular one before, but it's quite simple and seems obvious enough to me so it may exist in the literature somewhere.