Comments (4)
Hi! I'm not 100% sure where you think there is a bug. In my robin_hood map implementation the entries with equal PSL are sorted according to the hoisted hash bits, so it is ok to stop the loop before actually reaching the next PSL.
That's one of the tricks of robin_hood that I think are quite nice, because when PSL are used as the higher bits and the hoised hash bits used for the lower bits it is enough use info <= mInfo[idx]
as a stopping criteria
from robin-hood-hashing.
By the way I'm using exactly the same trick in my unordered_dense map: https://github.com/martinus/unordered_dense
I think that code might be easier to read. There I am always using 24bit as PSL and 8 bit for the hoisted hash, both stored in dist_and_fingerprint
: https://github.com/martinus/unordered_dense/blob/main/include/ankerl/unordered_dense.h#L317-L323
from robin-hood-hashing.
Thanks for the explanation. I will close the issue.
Is there a place in the source code where you state this property, of augmenting the Robin Hood invariant with the fingerprint of the key?
I will study your unordered_dense
from robin-hood-hashing.
Hm I don't think I have written down anywhere. Some years ago I wrote a blog post, but this is outdated: https://martin.ankerl.com/2016/09/21/very-fast-hashmap-in-c-part-2/
One more note, the encoded PSL value has an offset of 1, so 0 means the bucket is empty, 1 means this bucket is taken and actually is at the correct location, 2 means its one bucket away from its intended location.
from robin-hood-hashing.
Related Issues (20)
- Segmentation fault: 11 with std::this_thread::get_id(); as key in C++ HOT 5
- Idea for robin-hood-hashing V2 HOT 1
- Keys are not marked as const when used structured binding during iteration over container HOT 2
- My problem with robin_hood::erase HOT 4
- robin_hoodConfig.cmake missing HOT 4
- terminate called after throwing an instance of 'std::overflow_error' what(): robin_hood::map overflow Aborted (core dumped) HOT 5
- hope to support bazel HOT 1
- How can I further improve performance in a read-only load? HOT 2
- func unaligned_load can be optimized HOT 2
- Please only build tests when BUILD_TESTING=ON HOT 1
- undefined symbol: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) HOT 1
- Project doesn't install anything HOT 1
- Possible Data Corruption Bug? HOT 2
- does insert support std::pair? HOT 1
- Consider using `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`
- Explicit template instantiation
- There is a coredump if I defined <std::string, std::shared_ptr<void>> when a pointer delete
- intel compiler warnings (not a bug)
- crash because alignment of key is not respected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robin-hood-hashing.