Hi,

The code you are citing is part of a loop where the possible colliding
elements are checked for match. Before the loop the entry probe is
calculated from the hash on the key, and then quadric probing is used to
check all entries with the same hash. A null indicate that an element has
been deleted, so more probes are required. Undefined indicate on element
found.

Regards,
Søren

On Sat, Jun 19, 2010 at 08:28, zaheer ahmad <[email protected]> wrote:

> hi,
>
> iam looking at the following code which does lookup in the hash table
> int HashTable<Shape, Key>::FindEntry(Key key) {
>    ...
>    Object* element = KeyAt(entry);
>    if (!element->IsNull() && Shape::IsMatch(key, element)) return entry;
>    ...
> the key match seems to be unconditional. is it required in case there
> are no collisions in the table or is it optimized in some way in this
> case.
>
> sorry if iam being naive.
>
> Thanks,
> Zaheer
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to