-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up Array.prototype.join() (#1635)
Summary: Pull Request resolved: #1635 The improvement is based on the following ideas: - Optimistically assume the input array already contains strings and avoid copying them into a temporary array. - Switch to the slower path for the remaining elements, once a non-string is encountered. - Use faster access if the input is a dense array. Apparently this call is used by `print()`, so it is tested a lot implicitly, for example by the `array-push.js` test. Reviewed By: avp Differential Revision: D70415235
- Loading branch information
1 parent
90aca88
commit 93f6f39
Showing
1 changed file
with
140 additions
and
54 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