Please sign in to comment.
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: #13242 Ref: #13224 Reviewed-By: Andreas Madsen <email@example.com> Reviewed-By: Anna Henningsen <firstname.lastname@example.org>
- Loading branch information...
Showing with 4 additions and 31 deletions.