Skip to content

benchmark: fix url-searchparams-sort to sort a fresh list - #66535

Open
RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:fix-url-searchparams-sort-to-sort-a-fresh-list
Open

RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:fix-url-searchparams-sort-to-sort-a-fresh-list

Conversation

@RafaelGSS

@RafaelGSS RafaelGSS commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

As titled.

# before
type='empty' n=200000: 57,300,000
type='sorted' n=200000: 32,700,000
type='reversed' n=200000: 33,100,000
type='random' n=200000: 33,000,000
type='long' n=200000: 15,300,000

# after
type='empty' n=200000: 25,400,000
type='sorted' n=200000: 7,800,000
type='reversed' n=200000: 1,200,000
type='random' n=200000: 2,000,000
type='long' n=200000: 420,000

Copying from another URLSearchParams only slices its internal list,
so every iteration sorts a fresh, unsorted copy.

Refs: nodejs#50566
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
@RafaelGSS
RafaelGSS marked this pull request as ready for review October 5, 2026 14:49
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants