-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add any
function
#34
Add any
function
#34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Couple of things:
This seems to be missing code for the Collision nodes. We definitely need that.
Not sure whether the tests would have caught it. I suspect not. Tests on random data might have a hard time running into this. You'd need a collision and no earlier matching value. Shouldn't be too hard to construct a test case manually, though.
I think this can be slightly simplified, see below.
Thanks for the review.
What do you mean with this? |
Co-authored-by: Stefan Fehrenbach <stefan.fehrenbach@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
Thank you too ! |
Hashmap implements Foldable.any but Foldable can not short-ciruit. For big hashmaps this should be faster if the value is match is found early.
I also had an alternative implementation but i think it's a bit slower (quick n dirty benchmark)