[webkit-changes] [WebKit/WebKit] 4e87c5: [JSC] OOB PutByVal to TypedArray do not need to do...

Yusuke Suzuki noreply at github.com
Thu Aug 15 18:07:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4e87c5073b3ed5648e47a3ffe1f5128a5fdd81f8
      https://github.com/WebKit/WebKit/commit/4e87c5073b3ed5648e47a3ffe1f5128a5fdd81f8
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-08-15 (Thu, 15 Aug 2024)

  Changed paths:
    A JSTests/microbenchmarks/typed-array-put-by-val-oob-detach.js
    A JSTests/microbenchmarks/typed-array-put-by-val-oob.js
    A JSTests/stress/typed-array-put-by-val-oob-detach.js
    M Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] OOB PutByVal to TypedArray do not need to do anything more
https://bugs.webkit.org/show_bug.cgi?id=278182
rdar://133971914

Reviewed by Keith Miller.

OOB PutByVal onto TypedArray does not need to do anything. We remove OSR exit for detached array (we do not need it), and IC is also changed to be more efficient.

                                                  ToT                     Patched

    typed-array-put-by-val-oob               1.1416+-0.0120     ^      1.0989+-0.0124        ^ definitely 1.0388x faster
    typed-array-put-by-val-oob-detach       21.2081+-0.0142     ^      1.1120+-0.0181        ^ definitely 19.0722x faster

* JSTests/microbenchmarks/typed-array-put-by-val-oob-detach.js: Added.
(test1):
(test2):
* JSTests/microbenchmarks/typed-array-put-by-val-oob.js: Added.
(test1):
(test2):
* JSTests/stress/typed-array-put-by-val-oob-detach.js: Added.
(test1):
(test2):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::jumpForTypedArrayIsDetachedIfOutOfBounds): Deleted.
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

Canonical link: https://commits.webkit.org/282326@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