Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSC] Accelerate DirectArguments slice #5793

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Oct 26, 2022

df06fbb

[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

1fef001

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios   πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  watch   πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-mips
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress ❌ πŸ§ͺ jsc-mips-tests

@Constellation Constellation requested a review from a team as a code owner October 26, 2022 01:12
@Constellation Constellation self-assigned this Oct 26, 2022
@Constellation Constellation added JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. WebKit Nightly Build labels Oct 26, 2022
Copy link
Member

@shvaikalesh shvaikalesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done!

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 26, 2022
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
@webkit-commit-queue
Copy link
Collaborator

Committed 256027@main (df06fbb): https://commits.webkit.org/256027@main

Reviewed commits have been landed. Closing PR #5793 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit df06fbb into WebKit:main Oct 26, 2022
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 26, 2022
@Constellation Constellation deleted the eng/JSC-Accelerate-DirectArguments-slice branch October 26, 2022 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
4 participants