[webkit-reviews] review requested: [Bug 31362] [V8] Optimize getDOMNodeMap() : [Attachment 42980] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 11 11:10:32 PST 2009


Jens Alfke <snej at chromium.org> has asked  for review:
Bug 31362: [V8] Optimize getDOMNodeMap()
https://bugs.webkit.org/show_bug.cgi?id=31362

Attachment 42980: patch
https://bugs.webkit.org/attachment.cgi?id=42980&action=review

------- Additional Comments from Jens Alfke <snej at chromium.org>
getDOMNodeMap() (in V8DOMMap.cpp) is a surprisingly hot function in Dromaeo DOM
benchmarks, enough so that I decided to optimize it somewhat. What I've done is
inline together several of the calls that it makes — the function's not really
doing much, so quite a lot of its time is just spent in function prolog/epilog
boilerplate.

This took a bit more code-shuffling than it seems it ought to, because the code
to be inlined wasn't all in the same source file; so I had to move some stuff
from DOMData to MainThreadDOMData.

Result was that time spent in this function shrank by about half in my Shark
profiles. Dromaeo scores improved 'a bit'; the test results on my machine are
pretty noisy, but I saw consistently 1-2% better numbers. Which isn't a lot,
but these things add up.


More information about the webkit-reviews mailing list