Commit 04be2050 authored by Arthur O'Dwyer's avatar Arthur O'Dwyer
Browse files

In HASH_FIND_IN_BKT, check for hash equality before key equality.

Key equality (HASH_KEYCMP) is generally an expensive memcmp, whereas
if the two keys have different hashes, we can find that out in a single
integer comparison.

This is a particularly big win if your hash table stores long strings
all with the same length; for example, strings that started their life
as SHA hashes.
parent d72abaa5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment