RobinDict storing metadata
Was working on this. Part of GSoC 20 proposed work. Few changes in the original code
- Use of metadata
Metadata stored combines the hash and the distance to initial bucket in one place. the upper 8 bits of the
hashis scrapped (I have just assumed the remaining 24 bits provide sufficient entropy. Might be wrong. But let's see.) The remaining 8 bits are kept for storing the distance to the initial slot. - Scrapped the
rh_insert_for_rehash!. Reason. Couldn't wrap my head around the implementation. The metadata interferes in a strange way in this implementation. Will get back to it later. But the interesting thing is performance benchmarks shows improvement without this.
cc : @oxinabox @kanav99 @chethega
Looks good to me a few small things. though I don't really understand Robin Dict that well to begin with. i do trust that our tests and benchmarks are enough so that if it passed them then all is well.
what is the cuirrent TODO that are left? (since you say [WIP] in title)
Ahh, thing is I'm not sure myself whether I can pull off the rh_insert_for_rehash. I want to give it some thought. If I can do that, performance is guaranteed to improve further. That's why WIP. Else, this should be fine without it.
Technically, it should have been TIP. Thought In Progess. :laughing:
@oxinabox , let's hold onto this for a while. Until i finish the benchmark PR and I convince myself that rhinsert_for_rehash can't be written. I'll merge in due course of time.