You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to iterate over the map, count items, etc in a pretty economic way.
Iteration can be done simply by iterating over all the items, which should allow IDictionary (C#) and Iterable (PHP) interfaces to be implemented. I didn't implement it initially due to performance concerns, but those seem to be a non-issue??
Counting can be done by looking at the current generation and generating larger-spanned buckets that can be very quickly iterated without much contention. For example, generation 1 maps only cover 256 buckets, so dividing that into 4 buckets (for reads) to sum the count makes a lot of sense, while larger maps (>generation 4) might benefit from more divisions (more reads) but less potential for write contention.
The text was updated successfully, but these errors were encountered:
It should be possible to iterate over the map, count items, etc in a pretty economic way.
Iteration can be done simply by iterating over all the items, which should allow
IDictionary
(C#) andIterable
(PHP) interfaces to be implemented. I didn't implement it initially due to performance concerns, but those seem to be a non-issue??Counting can be done by looking at the current generation and generating larger-spanned buckets that can be very quickly iterated without much contention. For example, generation 1 maps only cover 256 buckets, so dividing that into 4 buckets (for reads) to sum the count makes a lot of sense, while larger maps (>generation 4) might benefit from more divisions (more reads) but less potential for write contention.
The text was updated successfully, but these errors were encountered: