Changeset 175462 in webkit


Ignore:
Timestamp:
Nov 2, 2014 8:37:59 AM (9 years ago)
Author:
Chris Dumez
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r175460 r175462  
     12014-11-02  Chris Dumez  <cdumez@apple.com>
     2
     3        Reduce the cost of argumentCount checks in the JS bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=138289
     5
     6        Reviewed by Sam Weinig.
     7
     8        Slightly reduce the cost of argumentCount checks in the JS bindings by
     9        hinting to the compiler that it is UNLIKELY that those methods are
     10        called with too few arguments.
     11
     12        I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
     13        performance test.
     14
     15        No new tests, no behavior change.
     16
     17        * bindings/scripts/CodeGeneratorJS.pm:
     18        (GenerateArgumentsCountCheck):
     19
    1202014-11-01  Alexey Proskuryakov  <ap@apple.com>
    221
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r174839 r175462  
    31673167    if ($numMandatoryParams >= 1)
    31683168    {
    3169         push(@$outputArray, "    if (exec->argumentCount() < $numMandatoryParams)\n");
     3169        push(@$outputArray, "    if (UNLIKELY(exec->argumentCount() < $numMandatoryParams))\n");
    31703170        push(@$outputArray, "        return throwVMError(exec, createNotEnoughArgumentsError(exec));\n");
    31713171    }
Note: See TracChangeset for help on using the changeset viewer.