promise: optimize the performance on .then and static resolve#385
Merged
promise: optimize the performance on .then and static resolve#385
Conversation
Contributor
|
|
Member
Author
|
The frozen |
qile222
approved these changes
Oct 21, 2018
61d1188 to
3ff46af
Compare
Member
Author
|
The CI seems pass, but GitHub doesn't get correct state. |
yorkie
added a commit
that referenced
this pull request
Oct 24, 2018
qile222
pushed a commit
that referenced
this pull request
Oct 27, 2018
* master: build: use CMAKE_INSTALL_PREFIX instead of custom install command (#391) child_process: introduce binary protocol to optimizing performance (#393) iotjs: cache parsed dump table for error.stack at runtime (#392) jerry: merge a59cf4f from upstream to optimize the function call (#381) promise: optimize the performance on .then and static resolve (#385) jerry: set prototype/constructor for external functions (#386) process: add shebang parser supports (#379) napi: fix complete callback segv/ticks on async-work (#380) jerry: pass regression-test-issue-2105 for heapdump (#382) tls, mqtts: fix connection not be actively disconnected (#375) websocket: fix the crash due to http exception (#376) process: add signal events support (#372)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The optimized
Promisecomparison:before#thenafter#thenbefore#resolveafter#resolveThe performance slots are:
then, removes to create duplicated empty function, and creates at start.Promise.resolve:doResolve, and immediately callsresolve(self, value)instead.undefined,trueandfalse.Checklist
npm testpasses