[webkit-changes] [WebKit/WebKit] 240fb3: [JSC] Add CachedCall fast path for specific argume...

Yusuke Suzuki noreply at github.com
Thu Apr 18 14:25:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 240fb30df0de1f3b18ee5a4ca0c8c3b683044d50
      https://github.com/WebKit/WebKit/commit/240fb30df0de1f3b18ee5a4ca0c8c3b683044d50
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
    A JSTests/microbenchmarks/uint32array-sort-custom.js
    M Source/JavaScriptCore/interpreter/CachedCall.h
    M Source/JavaScriptCore/interpreter/Interpreter.h
    M Source/JavaScriptCore/interpreter/InterpreterInlines.h
    M Source/JavaScriptCore/llint/LLIntThunks.cpp
    M Source/JavaScriptCore/llint/LLIntThunks.h
    M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
    M Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
    M Source/JavaScriptCore/offlineasm/arm64.rb
    M Source/JavaScriptCore/offlineasm/registers.rb
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
    M Source/JavaScriptCore/runtime/StringPrototypeInlines.h

  Log Message:
  -----------
  [JSC] Add CachedCall fast path for specific argument count
https://bugs.webkit.org/show_bug.cgi?id=272860
rdar://126651919

Reviewed by Keith Miller.

Let's make up-to-3 argumentCount CachedCall incredibly faster. We would like to hand-craft that for the other argument counts.
Based on static argument count, we use super fast asm setup in LLInt to invoke JS function.

                                        ToT                     Patched

    uint32array-sort-custom       73.6850+-0.7307     ^     53.4209+-1.7978        ^ definitely 1.3793x faster

* JSTests/microbenchmarks/uint32array-sort-custom.js: Added.
(i.array.sort):
* Source/JavaScriptCore/interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall):
(JSC::CachedCall::callWithArguments):
* Source/JavaScriptCore/interpreter/Interpreter.h:
* Source/JavaScriptCore/interpreter/InterpreterInlines.h:
(JSC::Interpreter::tryCallWithArguments2):
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
* Source/JavaScriptCore/llint/LLIntThunks.h:
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:
* Source/JavaScriptCore/offlineasm/arm64.rb:
* Source/JavaScriptCore/offlineasm/registers.rb:
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncSortImpl):
* Source/JavaScriptCore/runtime/StringPrototypeInlines.h:
(JSC::replaceUsingStringSearch):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list