Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSC] Optimize Array#indexOf in DFG / FTL
https://bugs.webkit.org/show_bug.cgi?id=246225 rdar://100907119 Reviewed by Justin Michaud and Alexey Shvayka. This patch optimizes JetStream2/babylon-wtb up to 10%. 1. We were giving up optimization of ArrayIndexOf once we start getting BadType on the searching parameter. But let's not do it and instead keep working with a bit more generic version since parameter type speculation only offers a bit of performance win. So, using generic one still makes sense in terms of optimization if type speculation failed before. 2. Add JSString::equalInline and use it in ArrayIndexOf DFG operation when we know the search parameter is JSString. 3. Add WTF::find64 optimized path for Object search in ArrayIndexOf DFG operation. * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall): * Source/JavaScriptCore/dfg/DFGOperations.cpp: (JSC::DFG::arrayIndexOfString): (JSC::DFG::JSC_DEFINE_JIT_OPERATION): * Source/JavaScriptCore/runtime/ArrayPrototype.cpp: (JSC::argumentClampedIndexFromStartOrEnd): * Source/JavaScriptCore/runtime/JSString.cpp: (JSC::JSString::equalSlowCase const): * Source/JavaScriptCore/runtime/JSString.h: * Source/JavaScriptCore/runtime/JSStringInlines.h: (JSC::JSString::equalInline const): Canonical link: https://commits.webkit.org/255296@main
- Loading branch information
1 parent
ea3d0e6
commit 6b2c1f4
Showing
6 changed files
with
61 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters