RESOLVED FIXED 21633
Avoid using a HashMap when there is only a single transition
https://bugs.webkit.org/show_bug.cgi?id=21633
Summary Avoid using a HashMap when there is only a single transition
Cameron Zwarich (cpst)
Reported 2008-10-15 17:43:52 PDT
We have determined through testing that the vast majority of StructureIDs have only 0 or 1 transition. We should not create a whole HashMap in these cases.
Attachments
Proposed patch (5.60 KB, patch)
2008-10-15 19:10 PDT, Cameron Zwarich (cpst)
mjs: review+
Cameron Zwarich (cpst)
Comment 1 2008-10-15 19:10:55 PDT
Created attachment 24382 [details] Proposed patch It would be nice if someone else (Maciej?) ran benchmarks on his own machine to verify.
Maciej Stachowiak
Comment 2 2008-10-15 20:46:42 PDT
Comment on attachment 24382 [details] Proposed patch r=me But it would be nice if we could abstract away the single-transition optimization a bit, by having some helper functions that hide the core logic (e.g. one to get an existing transition for a property - it could check either the single entry or the hashtable as appropriate) etc.
Cameron Zwarich (cpst)
Comment 3 2008-10-15 21:38:07 PDT
Landed in r37627.
Note You need to log in before you can comment on or make changes to this bug.