Introduce Overflow & Displacement tracking. #517
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Motivation:
Overflow tracking allows cutting a probing sequence short, which may be beneficial.
The use of a multitude of variants makes it easier to test and benchmark all variants, thus making it easier to pick the right one... or not pick any.
The groups are now forcibly aligned because overflow tracking is performed on a group basis, and does not work with "floating" groups.
Design:
Overflow trackers and displacements are tacked at the end of the allocation, and their access is minimized, so that their performance impact is minimized.
In particular:
This follows the philosophy of "You Don't Pay For What You Don't Use", and makes the impact as minimal as can be.
Benchmarks:
Methodology: each variant was benchmarked 3 times, and for each benchmark the best result was picked. Then all results were normalized on the current master for ease of comparison.
Remarks:
none
variant is completely neutral, which means that enforcing group alignment did not affect performance.may_have_overflowed
should be inlined since it's expected to be rare.In any case, at least with the scaffolding in place it should be possible to experiment further if there's any will to.