haikuwebkit/PerformanceTests/Bindings/undefined-get-element-by-id...

15 lines
415 B
HTML
Raw Permalink Normal View History

[perf-test] Add a binding benchmark for getElementById() for an undefined id https://bugs.webkit.org/show_bug.cgi?id=86812 Reviewed by Ryosuke Niwa. We should remove Bindings/dom-attributes.html and instead add more reasonable micro benchmarks by classifying DOM binding call paths. This patch adds a benchmark for document.getElementById() for an undefined id. This benchmark covers 'getElementById (not in document)' in Dromaeo/dom-query.html, and other Node-query methods that return a null.' (Note: This benchmark is slower than document.getElementById() for a defined id. We will fix the performance issue soon.) Test results in my Linux desktop: RESULT Bindings: undefined-get-element-by-id= 271.945751345 runs/s median= 273.122389532 runs/s, stdev= 6.78219237299 runs/s, min= 257.4002574 runs/s, max= 281.690140845 runs/s RESULT Bindings: undefined-get-element-by-id= 269.105872408 runs/s median= 268.948655257 runs/s, stdev= 5.73707323755 runs/s, min= 257.4002574 runs/s, max= 278.128950695 runs/s RESULT Bindings: undefined-get-element-by-id= 269.987513372 runs/s median= 272.952853598 runs/s, stdev= 5.30252336078 runs/s, min= 255.754475703 runs/s, max= 273.97260274 runs/s RESULT Bindings: undefined-get-element-by-id= 270.169625901 runs/s median= 271.604938272 runs/s, stdev= 5.29502391906 runs/s, min= 258.064516129 runs/s, max= 278.481012658 runs/s RESULT Bindings: undefined-get-element-by-id= 269.054631422 runs/s median= 267.966292802 runs/s, stdev= 6.27197240579 runs/s, min= 258.064516129 runs/s, max= 278.481012658 runs/s * Bindings/undefined-get-element-by-id.html: Added. Canonical link: https://commits.webkit.org/104469@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-18 09:23:35 +00:00
<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
Rename PerfTestRunner.runPerSecond to PerfTestRunner.measureRunsPerSecond for consistency https://bugs.webkit.org/show_bug.cgi?id=99642 Reviewed by Dirk Pranke. Renamed the method. * Bindings/append-child.html: * Bindings/create-element.html: * Bindings/event-target-wrapper.html: * Bindings/first-child.html: * Bindings/get-attribute.html: * Bindings/get-element-by-id.html: * Bindings/get-elements-by-tag-name.html: * Bindings/id-getter.html: * Bindings/id-setter.html: * Bindings/insert-before.html: * Bindings/node-list-access.html: * Bindings/scroll-top.html: * Bindings/set-attribute.html: * Bindings/typed-array-construct-from-array.html: * Bindings/typed-array-construct-from-same-type.html: * Bindings/typed-array-construct-from-typed.html: * Bindings/typed-array-set-from-typed.html: * Bindings/undefined-first-child.html: * Bindings/undefined-get-element-by-id.html: * Bindings/undefined-id-getter.html: * CSS/CSSPropertySetterGetter.html: * CSS/CSSPropertyUpdateValue.html: * CSS/PseudoClassSelectors.html: * DOM/textarea-dom.html: * DOM/textarea-edit.html: * Interactive/resources/window-resize.js: * Layout/flexbox-column-nowrap.html: * Layout/flexbox-column-wrap.html: * Layout/flexbox-row-nowrap.html: * Layout/flexbox-row-wrap.html: * Layout/line-layout.html: * Parser/css-parser-yui.html: * Parser/innerHTML-setter.html: * Parser/query-selector-deep.html: * Parser/query-selector-first.html: * Parser/query-selector-last.html: * Parser/simple-url.html: * Parser/textarea-parsing.html: * Parser/tiny-innerHTML.html: * Parser/url-parser.html: * Parser/xml-parser.html: * SVG/SvgNestedUse.html: * resources/runner.js: Canonical link: https://commits.webkit.org/117606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-10-17 22:06:52 +00:00
PerfTestRunner.measureRunsPerSecond({
[perf-test] Add a binding benchmark for getElementById() for an undefined id https://bugs.webkit.org/show_bug.cgi?id=86812 Reviewed by Ryosuke Niwa. We should remove Bindings/dom-attributes.html and instead add more reasonable micro benchmarks by classifying DOM binding call paths. This patch adds a benchmark for document.getElementById() for an undefined id. This benchmark covers 'getElementById (not in document)' in Dromaeo/dom-query.html, and other Node-query methods that return a null.' (Note: This benchmark is slower than document.getElementById() for a defined id. We will fix the performance issue soon.) Test results in my Linux desktop: RESULT Bindings: undefined-get-element-by-id= 271.945751345 runs/s median= 273.122389532 runs/s, stdev= 6.78219237299 runs/s, min= 257.4002574 runs/s, max= 281.690140845 runs/s RESULT Bindings: undefined-get-element-by-id= 269.105872408 runs/s median= 268.948655257 runs/s, stdev= 5.73707323755 runs/s, min= 257.4002574 runs/s, max= 278.128950695 runs/s RESULT Bindings: undefined-get-element-by-id= 269.987513372 runs/s median= 272.952853598 runs/s, stdev= 5.30252336078 runs/s, min= 255.754475703 runs/s, max= 273.97260274 runs/s RESULT Bindings: undefined-get-element-by-id= 270.169625901 runs/s median= 271.604938272 runs/s, stdev= 5.29502391906 runs/s, min= 258.064516129 runs/s, max= 278.481012658 runs/s RESULT Bindings: undefined-get-element-by-id= 269.054631422 runs/s median= 267.966292802 runs/s, stdev= 6.27197240579 runs/s, min= 258.064516129 runs/s, max= 278.481012658 runs/s * Bindings/undefined-get-element-by-id.html: Added. Canonical link: https://commits.webkit.org/104469@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-18 09:23:35 +00:00
description: "This benchmark covers 'getElementById (not in document)' in Dromaeo/dom-query.html, and other Node-query methods that return a null.",
run: function() {
for (var i = 0; i < 100000; i++)
document.getElementById("foo");
}});
</script>
</body>
</html>