MCPcopy Index your code
hub / github.com/nodejs/node / main

Function main

benchmark/url/url-searchparams-sort.js:34–46  ·  view source on GitHub ↗
({ type, n })

Source from the content-addressed store, hash-verified

32});
33
34function main({ type, n }) {
35 const searchParams = require('internal/url').searchParamsSymbol;
36 const input = inputs[type];
37 const params = new URLSearchParams();
38 const array = getParams(input);
39
40 bench.start();
41 for (let i = 0; i < n; i++) {
42 params[searchParams] = array.slice();
43 params.sort();
44 }
45 bench.end(n);
46}

Callers

nothing calls this directly

Calls 6

sortMethod · 0.95
getParamsFunction · 0.85
sliceMethod · 0.65
requireFunction · 0.50
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected