Skip to content
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

String comparison in Dictionary::Retrieve #287

Open
Triang3l opened this issue Jul 23, 2016 · 1 comment
Open

String comparison in Dictionary::Retrieve #287

Triang3l opened this issue Jul 23, 2016 · 1 comment

Comments

@Triang3l
Copy link
Contributor

Triang3l commented Jul 23, 2016

if (ep->key.Empty() || ep->key == key)

There is an || ep->key == key condition, but it's checked in an optimized way (only do string comparison when the hash is the same) later, and only for non-dummy keys. Also there's a similar comparison in the perturb loop.

Why was that comparison added there?

@Triang3l Triang3l changed the title Weird condition in Dictionary::Retrieve String comparison in Dictionary::Retrieve Jul 23, 2016
@Triang3l
Copy link
Contributor Author

(The original post was modified because it also referred to another comparison, which is correct.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant