Bug 31362 - [V8] Optimize getDOMNodeMap()
Summary: [V8] Optimize getDOMNodeMap()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Enhancement
Assignee: Jens Alfke
URL:
Keywords:
Depends on:
Blocks: 31217
  Show dependency treegraph
 
Reported: 2009-11-11 11:10 PST by Jens Alfke
Modified: 2009-11-12 16:28 PST (History)
0 users

See Also:


Attachments
patch (5.20 KB, patch)
2009-11-11 11:10 PST, Jens Alfke
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Alfke 2009-11-11 11:10:32 PST
Created attachment 42980 [details]
patch

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.
Comment 1 Dimitri Glazkov (Google) 2009-11-11 11:13:09 PST
Comment on attachment 42980 [details]
patch

r=me.
Comment 2 Jens Alfke 2009-11-11 11:20:34 PST
Committed revision 50826.