diff options
author | Sverker Eriksson <[email protected]> | 2015-06-08 15:50:46 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-06-15 14:14:32 +0200 |
commit | f7ef9fb1679fcd46c48ec5f8a968f7e053b3d4ed (patch) | |
tree | c1a46984f5a6f581e578dfbf1d9a62b70ddb8653 /.gitattributes | |
parent | c09561dc51be736943a32862a41a3eaef2e41b83 (diff) | |
download | otp-f7ef9fb1679fcd46c48ec5f8a968f7e053b3d4ed.tar.gz otp-f7ef9fb1679fcd46c48ec5f8a968f7e053b3d4ed.tar.bz2 otp-f7ef9fb1679fcd46c48ec5f8a968f7e053b3d4ed.zip |
erts: Optimize maps:merge
to be better at reusing entire hashmap sub-trees.
Sub-tree reuse is detected in three cases:
1. The sub-tree top node does not exist at all in the other map.
Already implemented before this commit.
2. The exact same sub-tree exist in both maps.
Must calculate nr of keys in tree to get total size right.
3. We detect that a sub-tree only contains stuff from one of the maps.
There is still one case we don't detect. If A and B leafs have equal
keys we could also compare the values. If values are equal, further
node reuse could propagate up toward the root (by 'mix'==0).
The downside would be potentially expensive value comparisons.
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions