[webkit-changes] [WebKit/WebKit] 0ac3e5: [JSC] Support ArrayWithInt32.concat(ArrayWithDoubl...

Yusuke Suzuki noreply at github.com
Wed Jun 21 19:18:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0ac3e5f3c4d0c91cfc3548c1a41b82cbb8735707
      https://github.com/WebKit/WebKit/commit/0ac3e5f3c4d0c91cfc3548c1a41b82cbb8735707
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-06-21 (Wed, 21 Jun 2023)

  Changed paths:
    A JSTests/microbenchmarks/array-concat-double-and-int32.js
    A JSTests/microbenchmarks/array-concat-int32-and-double.js
    M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
    M Source/JavaScriptCore/runtime/JSArray.cpp
    M Source/JavaScriptCore/runtime/JSArray.h
    M Source/JavaScriptCore/runtime/JSArrayInlines.h

  Log Message:
  -----------
  [JSC] Support ArrayWithInt32.concat(ArrayWithDouble) fast path
https://bugs.webkit.org/show_bug.cgi?id=258340
rdar://111085265

Reviewed by Michael Saboff.

This patch adds ArrayWithInt32.concat(ArrayWithDouble) fast path by promoting from Int32 to Double array.

                                              ToT                     Patched

    array-concat-int32-and-double        1.6732+-0.0203     ^      1.2596+-0.0190        ^ definitely 1.3283x faster
    array-concat-double-and-int32        1.5538+-0.0151     ^      1.2633+-0.0136        ^ definitely 1.2299x faster

* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::concatAppendOne):
(JSC::copyElements):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/JSArray.cpp:
(JSC::JSArray::appendMemcpy):
* Source/JavaScriptCore/runtime/JSArray.h:
* Source/JavaScriptCore/runtime/JSArrayInlines.h:
(JSC::JSArray::mergeIndexingTypeForCopying):

Canonical link: https://commits.webkit.org/265386@main




More information about the webkit-changes mailing list