mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 21:08:56 -05:00
perf(webidl): optimize createDictionaryConverter() (#12279)
On a benchmark constructing Responses with headers this shaves off 25%
This commit is contained in:
parent
c79fd8f419
commit
fec0f1c8bb
1 changed files with 2 additions and 1 deletions
|
@ -41,6 +41,7 @@
|
|||
NumberMAX_SAFE_INTEGER,
|
||||
// deno-lint-ignore camelcase
|
||||
NumberMIN_SAFE_INTEGER,
|
||||
ObjectAssign,
|
||||
ObjectCreate,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
|
@ -726,7 +727,7 @@
|
|||
}
|
||||
const esDict = V;
|
||||
|
||||
const idlDict = { ...defaultValues };
|
||||
const idlDict = ObjectAssign({}, defaultValues);
|
||||
|
||||
// NOTE: fast path Null and Undefined.
|
||||
if ((V === undefined || V === null) && !hasRequiredKey) {
|
||||
|
|
Loading…
Reference in a new issue