async_wrap,src: wrap promises directly
Promises do not have any internal fields by default. V8 recently added the capability of configuring the number of internal fields on promises. This change adds an internal field to promises allowing promises to be wrapped directly by the PromiseWrap object. In addition to cleaner code this avoids an extra object allocation per promise and speeds up promise creation with async_hooks enabled by ~2x. PR-URL: https://github.com/nodejs/node/pull/13242 Ref: https://github.com/nodejs/node/pull/13224 Reviewed-By:Andreas Madsen <amwebdk@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
parent
0be029ec
Please register or sign in to comment