Title: [117503] trunk/PerformanceTests
Revision
117503
Author
hara...@chromium.org
Date
2012-05-17 15:04:49 -0700 (Thu, 17 May 2012)

Log Message

[perf-test] Add a micro benchmark for div.firstChild getter for an undefined firstChild
https://bugs.webkit.org/show_bug.cgi?id=86725

Reviewed by Ryosuke Niwa.

We are going to remove Bindings/dom-attributes.html and instead add more
reasonable micro benchmarks by classifying DOM binding call paths.

In this bug, we add a micro benchmark for div.firstChild getter for an
undefined firstChild. This benchmark covers other undefined DOM attributes
that return a null.

(Note: In V8, div.firstChild for an undefined firstChild is currently slower
than div.firstChild for a defined firstChild.)

Test results in my Linux desktop:

RESULT Bindings: undefined-first-child= 541.408311042 runs/s
median= 541.205412054 runs/s, stdev= 1.29841219187 runs/s, min= 537.897310513 runs/s, max= 543.209876543 runs/s

RESULT Bindings: undefined-first-child= 541.00750695 runs/s
median= 540.540540541 runs/s, stdev= 0.967521230965 runs/s, min= 539.215686275 runs/s, max= 543.209876543 runs/s

RESULT Bindings: undefined-first-child= 523.630714897 runs/s
median= 523.560209424 runs/s, stdev= 1.01570919645 runs/s, min= 522.193211488 runs/s, max= 525.624178712 runs/s

RESULT Bindings: undefined-first-child= 553.077663588 runs/s
median= 553.459119497 runs/s, stdev= 0.805697397863 runs/s, min= 551.378446115 runs/s, max= 554.156171285 runs/s

RESULT Bindings: undefined-first-child= 541.5401432 runs/s
median= 541.538666618 runs/s, stdev= 0.954301364767 runs/s, min= 539.877300613 runs/s, max= 543.209876543 runs/s

* Bindings/undefined-first-child.html: Added.

Modified Paths

Added Paths

Diff

Added: trunk/PerformanceTests/Bindings/undefined-first-child.html (0 => 117503)


--- trunk/PerformanceTests/Bindings/undefined-first-child.html	                        (rev 0)
+++ trunk/PerformanceTests/Bindings/undefined-first-child.html	2012-05-17 22:04:49 UTC (rev 117503)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+var div = document.createElement("div");
+
+PerfTestRunner.runPerSecond({
+    description: "This benchmark covers undefined DOM attributes that return a null.",
+    run: function() {
+        var localDiv = div;
+        for (var i = 0; i < 100000; i++)
+            localDiv.firstChild;
+}});
+</script>
+</body>
+</html>

Modified: trunk/PerformanceTests/ChangeLog (117502 => 117503)


--- trunk/PerformanceTests/ChangeLog	2012-05-17 21:59:05 UTC (rev 117502)
+++ trunk/PerformanceTests/ChangeLog	2012-05-17 22:04:49 UTC (rev 117503)
@@ -1,5 +1,41 @@
 2012-05-17  Kentaro Hara  <hara...@chromium.org>
 
+        [perf-test] Add a micro benchmark for div.firstChild getter for an undefined firstChild
+        https://bugs.webkit.org/show_bug.cgi?id=86725
+
+        Reviewed by Ryosuke Niwa.
+
+        We are going to remove Bindings/dom-attributes.html and instead add more
+        reasonable micro benchmarks by classifying DOM binding call paths.
+
+        In this bug, we add a micro benchmark for div.firstChild getter for an
+        undefined firstChild. This benchmark covers other undefined DOM attributes
+        that return a null.
+
+        (Note: In V8, div.firstChild for an undefined firstChild is currently slower
+        than div.firstChild for a defined firstChild.)
+
+        Test results in my Linux desktop:
+
+        RESULT Bindings: undefined-first-child= 541.408311042 runs/s
+        median= 541.205412054 runs/s, stdev= 1.29841219187 runs/s, min= 537.897310513 runs/s, max= 543.209876543 runs/s
+
+        RESULT Bindings: undefined-first-child= 541.00750695 runs/s
+        median= 540.540540541 runs/s, stdev= 0.967521230965 runs/s, min= 539.215686275 runs/s, max= 543.209876543 runs/s
+
+        RESULT Bindings: undefined-first-child= 523.630714897 runs/s
+        median= 523.560209424 runs/s, stdev= 1.01570919645 runs/s, min= 522.193211488 runs/s, max= 525.624178712 runs/s
+
+        RESULT Bindings: undefined-first-child= 553.077663588 runs/s
+        median= 553.459119497 runs/s, stdev= 0.805697397863 runs/s, min= 551.378446115 runs/s, max= 554.156171285 runs/s
+
+        RESULT Bindings: undefined-first-child= 541.5401432 runs/s
+        median= 541.538666618 runs/s, stdev= 0.954301364767 runs/s, min= 539.877300613 runs/s, max= 543.209876543 runs/s
+
+        * Bindings/undefined-first-child.html: Added.
+
+2012-05-17  Kentaro Hara  <hara...@chromium.org>
+
         [Performance test] Add a micro benchmark for div.firstChild getter
         https://bugs.webkit.org/show_bug.cgi?id=86582
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to