Title: [175462] trunk/Source/WebCore
Revision
175462
Author
[email protected]
Date
2014-11-02 08:37:59 -0800 (Sun, 02 Nov 2014)

Log Message

Reduce the cost of argumentCount checks in the JS bindings
https://bugs.webkit.org/show_bug.cgi?id=138289

Reviewed by Sam Weinig.

Slightly reduce the cost of argumentCount checks in the JS bindings by
hinting to the compiler that it is UNLIKELY that those methods are
called with too few arguments.

I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
performance test.

No new tests, no behavior change.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateArgumentsCountCheck):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (175461 => 175462)


--- trunk/Source/WebCore/ChangeLog	2014-11-02 07:06:20 UTC (rev 175461)
+++ trunk/Source/WebCore/ChangeLog	2014-11-02 16:37:59 UTC (rev 175462)
@@ -1,3 +1,22 @@
+2014-11-02  Chris Dumez  <[email protected]>
+
+        Reduce the cost of argumentCount checks in the JS bindings
+        https://bugs.webkit.org/show_bug.cgi?id=138289
+
+        Reviewed by Sam Weinig.
+
+        Slightly reduce the cost of argumentCount checks in the JS bindings by
+        hinting to the compiler that it is UNLIKELY that those methods are
+        called with too few arguments.
+
+        I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
+        performance test.
+
+        No new tests, no behavior change.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateArgumentsCountCheck):
+
 2014-11-01  Alexey Proskuryakov  <[email protected]>
 
         REGRESSION: Using a media element changes window.name

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (175461 => 175462)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2014-11-02 07:06:20 UTC (rev 175461)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2014-11-02 16:37:59 UTC (rev 175462)
@@ -3166,7 +3166,7 @@
     }
     if ($numMandatoryParams >= 1)
     {
-        push(@$outputArray, "    if (exec->argumentCount() < $numMandatoryParams)\n");
+        push(@$outputArray, "    if (UNLIKELY(exec->argumentCount() < $numMandatoryParams))\n");
         push(@$outputArray, "        return throwVMError(exec, createNotEnoughArgumentsError(exec));\n");
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to