Bug 80506

Summary: [V8][Performance] Optimize Element.firstElementChild, Element.lastElementChild, Element.previousElementSibling, Element.nextElementSibling, Node.parentElement
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, arv, japhet, ojan, rakuco, rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Performance tests
none
Patch none

Kentaro Hara
Reported 2012-03-07 04:00:59 PST
Element.firstElementChild, Element.lastElementChild, Element.previousElementSibling, Element.nextElementSibling and Node.parentElement of V8 are much slower than JSC. We should optimize them. The results of the attached performance tests are as follows in my local Mac environment : AppleWebKit/Safari: div.firstElementChild : 1162ms div.lastElementChild : 1016ms div.previousElementSibling : 918ms div.nextElementSibling : 900ms div.parentElement : 901ms Chromium/V8: div.firstElementChild : 9515ms div.lastElementChild : 9449ms div.previousElementSibling : 9254ms div.nextElementSibling : 9315ms div.parentElement : 9380ms
Attachments
Performance tests (1.74 KB, text/html)
2012-03-07 04:01 PST, Kentaro Hara
no flags
Patch (9.88 KB, patch)
2012-03-07 04:05 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-03-07 04:01:38 PST
Created attachment 130594 [details] Performance tests
Kentaro Hara
Comment 2 2012-03-07 04:05:14 PST
Adam Barth
Comment 3 2012-03-07 10:09:56 PST
Comment on attachment 130595 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=130595&action=review > Source/WebCore/ChangeLog:11 > + This patch improves the performance of Element.firstElementChild by 5.8 times, > + Element.lastElementChild by 6.2 times, Element.previousElementSibling by 7.1 times, > + Element.nextElementSibling by 7.1 times, and Node.parentElement by 6.7 times. Wow
WebKit Review Bot
Comment 4 2012-03-07 14:37:17 PST
Comment on attachment 130595 [details] Patch Clearing flags on attachment: 130595 Committed r110106: <http://trac.webkit.org/changeset/110106>
WebKit Review Bot
Comment 5 2012-03-07 14:37:22 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.