DataStructures.jl icon indicating copy to clipboard operation
DataStructures.jl copied to clipboard

RobinDict storing metadata

Open eulerkochy opened this issue 5 years ago • 3 comments

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 hash is 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

eulerkochy avatar May 21 '20 09:05 eulerkochy

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)

oxinabox avatar May 22 '20 11:05 oxinabox

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:

eulerkochy avatar May 22 '20 12:05 eulerkochy

@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.

eulerkochy avatar Jun 10 '20 04:06 eulerkochy