robclu / leapfrog

Lock-free concurrent and single-threaded hash map implementations using Leapfrog probing. Currently the highest performance concurrent HashMap in Rust for certain use cases.
Apache License 2.0
206 stars 9 forks source link

Do not return null values from iterators #11

Closed mosmeh closed 1 year ago

mosmeh commented 1 year ago

Fixes https://github.com/robclu/leapfrog/issues/10

Instead of returning Ref/RefMut containing a null value from LeapMap's iterators, we can skip returning it at the cost of one additional load, but that is up to the maintainer's choice.

robclu commented 1 year ago

Hi,

Thanks for catching this, and I think that the fix should have minimal implications for performance, and the behaviour without it is incorrect.

Will merge and release a new version shortly.