Open houqp opened 2 years ago
The hash brown crate is used for those reasons:
RawEntry
, which can avoid hashing / looking up elements twice.I think best would be to define a HashMap
type alias, so we can use whatever is set by default across the project.
Agreed, I think we should move all HashMap import to our own pluggable type alias and set hashbrown::HashMap
as the default.
hashbrown::HashMap
is a good choice 👍 in my opinion
Is your feature request related to a problem or challenge? Please describe what you are trying to do. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and why for this feature, in addition to the what)
We are using both
std::collections::HashMap
andhashbrown::HashMap
in datafusion, it would be better to consistently use only one of them.hashbrown's official readme has the following statement:
However, it's unclear whether Rust std also uses ahash as the default hasher. If not, it seems like hashbrown would still be a better choice when it comes to performance.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context
Follow up from https://github.com/apache/arrow-datafusion/pull/676#discussion_r663544711.