mirror of https://github.com/lukechilds/node.git
Browse Source
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>v6
committed by
Anna Henningsen
3 changed files with 4 additions and 31 deletions
Loading…
Reference in new issue