Skip to content

Commit 2be4753

Browse files
committed
Increase maximum sharing map tree height from 6 to 10
Now that the sharing map tree grows dynamically as elements are inserted, a higher value for the maximum tree height can be used. The maximum tree height is determined by bits / chunk, with bits being the number of bits of the hash code used, and chunk being the number of bits used to determine the child node of an inner node. For example, if chunk = 3, then a node can have at most 8 children. Then if bits = 30, bits / chunk = 10 and the maximum tree height is 10. The constant bits should be divisible by chunk.
1 parent e4174dd commit 2be4753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/sharing_map.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ SHARING_MAPT2(optionalt<std::reference_wrapper<const, mapped_type>>)::find(
12841284

12851285
SHARING_MAPT(const std::string)::not_found_msg="key not found";
12861286

1287-
SHARING_MAPT(const std::size_t)::bits = 18;
1287+
SHARING_MAPT(const std::size_t)::bits = 30;
12881288
SHARING_MAPT(const std::size_t)::chunk = 3;
12891289

12901290
SHARING_MAPT(const std::size_t)::mask = 0xffff >> (16 - chunk);

0 commit comments

Comments
 (0)