Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JSC] Accelerate DirectArguments slice
https://bugs.webkit.org/show_bug.cgi?id=247040 rdar://101570036 Reviewed by Alexey Shvayka. This patch adds fast Array#slice operation onto DirectArguments since this can be seen in some applications including Speedometer2.1/Ember-Debug-TodoMVC and JetStream2/coffeescript-wtb. This improves performance by 3.5x. ToT Patched direct-arguments-slice 15.8485+-0.1058 ^ 4.5368+-0.2171 ^ definitely 3.4933x faster * JSTests/microbenchmarks/direct-arguments-slice.js: Added. (test): * Source/JavaScriptCore/runtime/DirectArguments.cpp: (JSC::DirectArguments::fastSlice): * Source/JavaScriptCore/runtime/DirectArguments.h: * Source/JavaScriptCore/runtime/JSArray.cpp: (JSC::JSArray::fastSlice): Canonical link: https://commits.webkit.org/256027@main
- Loading branch information
1 parent
5c76515
commit df06fbb5f652bdb89e2f2bda187c44b83f4e3d7d
Showing
4 changed files
with
48 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var slice = Array.prototype.slice; | ||
function test(a, b, c, d, e, f, g, h, i, j, k, l) | ||
{ | ||
return slice.call(arguments); | ||
} | ||
noInline(test); | ||
|
||
for (var i = 0; i < 1e5; ++i) { | ||
test(1, "hello", null, undefined, 42, Array, Symbol.iterator, false, 42.195, 0, -200, -44.2); | ||
} |
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