mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00:00
perf(webidl): optimize createDictionaryConverter() (#12279)
On a benchmark constructing Responses with headers this shaves off 25%
This commit is contained in:
parent
a2632c86b1
commit
72836478f2
@ -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 New Issue
Block a user