WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
51612
Add XML parser benchmark
https://bugs.webkit.org/show_bug.cgi?id=51612
Summary
Add XML parser benchmark
Patrick R. Gansterer
Reported
2010-12-25 14:45:45 PST
see patch
Attachments
Patch
(3.21 KB, patch)
2010-12-25 14:52 PST
,
Patrick R. Gansterer
eric
: review-
Details
Formatted Diff
Diff
Patch
(14.89 KB, patch)
2010-12-26 14:36 PST
,
Patrick R. Gansterer
abarth
: review+
abarth
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2010-12-25 14:52:06 PST
Created
attachment 77444
[details]
Patch I'll commit manually to do a svn cp from html-parser.
Eric Seidel (no email)
Comment 2
2010-12-26 13:26:25 PST
Comment on
attachment 77444
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=77444&action=review
> WebCore/benchmarks/parser/xml-parser.html:69 > +function computeMedian(values) { > + values.sort(function(a, b) { return a - b; }); > + var len = values.length; > + if (len % 2) > + return values[(len-1)/2]; > + return (values[len/2-1] + values[len/2]) / 2; > +} > + > +function computeMin(values) { > + var min = values.length ? values[0] : 0; > + for (var i = 1; i < values.length; i++) { > + if (min > values[i]) > + min = values[i]; > + } > + return min; > +} > + > +function computeStdev(values) { > + var average = computeAverage(values); > + var sumOfSquaredDeviations = 0; > + for (var i = 0; i < values.length; ++i) { > + var deviation = values[i] - average; > + sumOfSquaredDeviations += deviation * deviation; > + } > + return Math.sqrt(sumOfSquaredDeviations / values.length); > +}
Lets share all thsi stuff in a new .js file. No need to copy/paste here.
Patrick R. Gansterer
Comment 3
2010-12-26 14:36:31 PST
Created
attachment 77463
[details]
Patch (In reply to
comment #2
)
> Lets share all thsi stuff in a new .js file. No need to copy/paste here.
thx for the tip
Adam Barth
Comment 4
2010-12-31 01:37:53 PST
Comment on
attachment 77463
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=77463&action=review
Thanks. I'll land this manually before moving these files to the new PerformanceTests folder.
> WebCore/benchmarks/parser/resources/runner.js:95 > +function start(rC, rF) { > + runCount = rC; > + runFunction = rF; > + > + log("Running " + runCount + " times"); > + run(); > +}
rC and rF are pretty short variable names. Generally, we prefer to use real english words rather than abbreviations. I'll tweak this during landing.
Adam Barth
Comment 5
2010-12-31 01:47:08 PST
Your patch is also incorrectly based. Please create patches either with svn-create-patch or with webkit-patch to ensure they are properly based.
Adam Barth
Comment 6
2010-12-31 02:02:01 PST
Committed
r74824
: <
http://trac.webkit.org/changeset/74824
>
Patrick R. Gansterer
Comment 7
2010-12-31 02:54:33 PST
(In reply to
comment #5
)
> Your patch is also incorrectly based.
??? What is wrong?
> Please create patches either with svn-create-patch or with webkit-patch to ensure they are properly based.
I normally use git diff and it works without problems and in this case I used svn-create-patch.
Adam Barth
Comment 8
2010-12-31 12:29:08 PST
(In reply to
comment #7
)
> (In reply to
comment #5
) > > Your patch is also incorrectly based. > ??? What is wrong?
Hum... Maybe the moves confused svn-apply? I had to edit the patch manually to get it to apply.
> > Please create patches either with svn-create-patch or with webkit-patch to ensure they are properly based. > I normally use git diff and it works without problems and in this case I used svn-create-patch.
Interesting. The patch has a strange mix of forward and backward slashes. Maybe that was the problem?
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