Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: runtime/vm/weak_table.h

Issue 1965553003: Improve the weak table hash. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/weak_table.h
diff --git a/runtime/vm/weak_table.h b/runtime/vm/weak_table.h
index aca86fc45e322fdbab770bf882981b97f216215a..01a607baa870aedb05006feb5609abd9791f950a 100644
--- a/runtime/vm/weak_table.h
+++ b/runtime/vm/weak_table.h
@@ -154,7 +154,7 @@ class WeakTable {
void Rehash();
static intptr_t Hash(RawObject* key) {
- return reinterpret_cast<intptr_t>(key) >> kObjectAlignmentLog2;
+ return reinterpret_cast<intptr_t>(key) * 92821;
}
// data_ contains size_ tuples of key/value.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698