hermes
hermes copied to clipboard
Speed up Array.prototype.join()
Summary: 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.
Differential Revision: D70415235
This pull request was exported from Phabricator. Differential Revision: D70415235
This pull request was exported from Phabricator. Differential Revision: D70415235
This pull request was exported from Phabricator. Differential Revision: D70415235