Avoid unnecessary hashing in OrderedHashTable
authoradamk@chromium.org <adamk@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 9 Jul 2014 16:19:53 +0000 (16:19 +0000)
committeradamk@chromium.org <adamk@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 9 Jul 2014 16:19:53 +0000 (16:19 +0000)
commit05463c49069352b446f2f63307f65dec275b7a37
tree579d0270c7af9872fc4756c98c5f124749f896f2
parent79ddf746d9a5c633833926e7976fd2104b1082e2
Avoid unnecessary hashing in OrderedHashTable

Add an overload of OrderedHashTable::FindEntry that takes
a hash along with the key to allow callsites which need to
re-use the hash (such as Add()) to avoid recomputing it.

On my Macbook this results in improvements on the Collections
microbenchmarks:
  Map-Collections: +4%
  Set-Collections: +5%

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/373323002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/objects.cc
src/objects.h