WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
87742
[perf-test] Add a benchmark for querySelector()
https://bugs.webkit.org/show_bug.cgi?id=87742
Summary
[perf-test] Add a benchmark for querySelector()
Kentaro Hara
Reported
2012-05-29 07:00:33 PDT
Now I am optimizing querySelector() (
bug 87625
). We want to add a performance test for querySelector().
Attachments
Patch
(4.91 KB, patch)
2012-05-29 07:09 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
patch for landing
(4.92 KB, patch)
2012-05-29 23:17 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2012-05-29 07:09:34 PDT
Created
attachment 144550
[details]
Patch
Ryosuke Niwa
Comment 2
2012-05-29 12:21:42 PDT
Comment on
attachment 144550
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144550&action=review
We probably want one more case where the node is deep in the tree (i.e. 20-50 levels of nesting).
> PerformanceTests/Parser/query-selector-last.html:5 > +</body>
Why are you closing body here?
> PerformanceTests/Parser/query-selector-last.html:7 > +for (var i = 0; i < 1000; i++) {
Is 1000 enough to make a difference?
> PerformanceTests/Parser/query-selector-last.html:11 > + var div = document.createElement("div"); > + div.id = "foo"; > + div.className = "bar"; > + document.body.appendChild(div);
Nit: 2-space indentation.
Kentaro Hara
Comment 3
2012-05-29 16:58:30 PDT
(In reply to
comment #2
)
> We probably want one more case where the node is deep in the tree (i.e. 20-50 levels of nesting).
I am happy to add it if you want, but would there be any big difference between "a node at the tail of the long flat tree" (tested by query-selector-last.html) and "a node deeply nested in the tree"?
> > PerformanceTests/Parser/query-selector-last.html:7 > > +for (var i = 0; i < 1000; i++) { > > Is 1000 enough to make a difference?
Yes. As I described in ChangeLog: [query-selector-first.html] RESULT Parser: query-selector-first= 252.339803014 runs/s median= 253.646265594 runs/s, stdev= 2.32610873209 runs/s, min= 248.138957816 runs/s, max= 254.777070064 runs/s [query-selector-last.html] RESULT Parser: query-selector-last= 356.009616076 runs/s median= 355.781448539 runs/s, stdev= 0.841519086864 runs/s, min= 354.430379747 runs/s, max= 358.056265985 runs/s Note that the loop count of query-selector-last.html is 1/10 of query-selector-first.html. (Maybe we should make the loop count the same, to compare the two results at a glance.)
Kentaro Hara
Comment 4
2012-05-29 23:17:20 PDT
Created
attachment 144713
[details]
patch for landing
WebKit Review Bot
Comment 5
2012-05-30 00:01:09 PDT
Comment on
attachment 144713
[details]
patch for landing Clearing flags on attachment: 144713 Committed
r118899
: <
http://trac.webkit.org/changeset/118899
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug