Skip to content

url.searchParamsSymbol may affect the benchmark results of URLSearchParams.sort() #50566

Open
@kylo5aby

Description

@kylo5aby

The benchmark script url-searchparams-sort.js currently utilizes searchParamsSymbol to create key-value pairs for URLSearchParams, but it has been removed since Node.js version 20.x. This removal may have an impact on the benchmark results, potentially affecting comparisons, such as between versions 18.x and 21.x.

node-benchmark-compare ./result-18vs21.csv
url/url-searchparams-sort.js n=1000000 type='almostsorted'                                                       ***    280.49 %       ±3.94%   ±5.31%   ±7.04%
url/url-searchparams-sort.js n=1000000 type='empty'                                                              ***    -31.36 %       ±2.43%   ±3.26%   ±4.31%
url/url-searchparams-sort.js n=1000000 type='long'                                                               ***   5610.63 %     ±125.82% ±169.57% ±225.12%
url/url-searchparams-sort.js n=1000000 type='random'                                                             ***   1631.31 %      ±18.26%  ±24.61%  ±32.68%
url/url-searchparams-sort.js n=1000000 type='reversed'                                                           ***   2811.61 %      ±60.96%  ±82.16% ±109.08%
url/url-searchparams-sort.js n=1000000 type='short'                                                              ***    261.52 %       ±5.30%   ±7.13%   ±9.46%
url/url-searchparams-sort.js n=1000000 type='sorted'                                                             ***    264.81 %       ±7.48%  ±10.08%  ±13.37%
url/url-searchparams-sort.js n=1000000 type='wpt'                                                                ***    -29.95 %       ±0.54%   ±0.72%   ±0.93%

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarkIssues and PRs related to the benchmark subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions