Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: PerformanceTests/Bindings/dom-attribute-on-prototoype.html

Issue 836923005: Add a performance benchmark for Node.baseURI (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/Bindings/dom-attribute-on-prototoype.html
diff --git a/PerformanceTests/Bindings/dom-attribute-on-prototoype.html b/PerformanceTests/Bindings/dom-attribute-on-prototoype.html
new file mode 100644
index 0000000000000000000000000000000000000000..689d6410de9f4f57e6672c181c91ebab48f41780
--- /dev/null
+++ b/PerformanceTests/Bindings/dom-attribute-on-prototoype.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/runner.js"></script>
+<script>
+var elements = [];
+elements.push(document.createElement("div"));
+elements.push(document.createElement("a"));
+elements.push(document.createElement("br"));
+elements.push(document.createElement("form"));
+elements.push(document.createElement("canvas"));
+elements.push(document.createElement("img"));
+elements.push(document.createElement("details"));
+elements.push(document.createElement("font"));
+elements.push(document.createElement("span"));
+elements.push(document.createElement("table"));
+elements.push(document.createElement("tbody"));
+elements.push(document.createElement("th"));
+elements.push(document.createElement("tr"));
+elements.push(document.createElement("td"));
+
+PerfTestRunner.measureRunsPerSecond({
+ description: "A benchmark to test performance when accessing a DOM attribute on a prototype chain of multipe types of elements. See https://crbug.com/43394 for more background.",
+ run: function() {
+ var localElements = elements;
+ for (var i = 0; i < 10000; i++) {
+ for (var j = 0; j < 14; j++) {
+ elements[j].baseURI;
+ }
+ }
+}});
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698