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
⚡ improved collision logic in RealNumberUniqueTable (#461)
## Description
This PR improves the logic for handling collisions in the unique table
for real numbers.
Since we track tail pointers anyway, insertions in the back can be
accomplished very cheaply.
This can be used in both lookup scenarios; the border case and the
middle case.
If no match was found in a border case, it is clear that the new entry
should either be added to the end of one or the beginning of the other
bucket list.
In the standard case, one can first check whether the looked up value is
larger (or equal) than the last element in the bucket.
If so, the new entry can just be added to the end of the collision
chain.
In a 33-qubit Grover simulation this saved a couple million collisions.
## Checklist:
<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->
- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.
0 commit comments