see patch
Created attachment 77444 [details] Patch I'll commit manually to do a svn cp from html-parser.
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.
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
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.
Your patch is also incorrectly based. Please create patches either with svn-create-patch or with webkit-patch to ensure they are properly based.
Committed r74824: <http://trac.webkit.org/changeset/74824>
(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.
(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?