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
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
couple of related questions
- is there a provision in v8 api to generate perfect hash for static
tables at the cost of little memory (gperf)
- i think it may be helpful to reorder the requested entry to the head
of the collision chain (locality principle) and if the cost of swap is
cheap.
Thanks,
Zaheer
2010/6/22 Søren Gjesse <sgj...@chromium.org>: