In containsExactly, hash elements when we can
Open
P3
type=performance
- Dominant language
- Java
- Stars
- 2.8k
- Forks
- 275
- Avg merge
- 7m
- Merged PRs (30d)
- 4
Description
(This could improve performance in some cases.)
Currently, we avoid hashing in all cases, just in case it doesn't work for some objects. But hashing does work for the vast majority of objects, and it should make things faster when there's a lot of data (though potentially slower when there's only a little data and/or the hash function is slow...).
As of https://github.com/google/truth/commit/88d2ef32e1e05aba9102d2fa5f8050acaad5190f, hashing should be pretty easy to enable. But this is a low priority.
[Edit: If we do this, we probably want to rename "NonHashing"Multiset :)]
Contributor guide
Assessment
This issue has not been assessed yet.