url: avoid instanceof for WHATWG URL · nodejs/node@b50a84a · GitHub
Skip to content

Commit b50a84a

Browse files
mscdexevanlucas
authored andcommitted
url: avoid instanceof for WHATWG URL
PR-URL: #12507 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b9b93f2 commit b50a84a

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

benchmark/url/url-searchparams-read.js

Lines changed: 1 addition & 1 deletion

benchmark/url/whatwg-url-properties.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
prop: ['href', 'origin', 'protocol',
99
'username', 'password', 'host', 'hostname', 'port',
1010
'pathname', 'search', 'searchParams', 'hash'],
11-
n: [1e4]
11+
n: [3e5]
1212
});
1313

1414
function setAndGet(n, url, prop, alternative) {

lib/internal/url.js

Lines changed: 21 additions & 15 deletions

0 commit comments

Comments
 (0)