benchmark: fix first call to URL in useWHATWG
PR-URL: https://github.com/nodejs/node/pull/11170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
This commit is contained in:
parent
6af0bfe1a0
commit
c6b586de33
@ -34,7 +34,7 @@ function useLegacy(n, input) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function useWHATWG(n, input) {
|
function useWHATWG(n, input) {
|
||||||
var noDead = url.parse(input);
|
var noDead = new URL(input);
|
||||||
bench.start();
|
bench.start();
|
||||||
for (var i = 0; i < n; i += 1) {
|
for (var i = 0; i < n; i += 1) {
|
||||||
noDead = new URL(input);
|
noDead = new URL(input);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user