Skip to content

Conversation

@KhafraDev
Copy link
Member

@KhafraDevKhafraDev commented Apr 13, 2023

This PR implements a fast api for url CanParse when only an input is provided. The benchmarks show massive improvements (https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1330/):

 confidence improvement accuracy (*) (**) (***) url/whatwg-url-canParse.js n=1000000 type='auth' *** 17.58 % ±3.12% ±4.16% ±5.45% url/whatwg-url-canParse.js n=1000000 type='dot' *** 29.57 % ±3.39% ±4.54% ±5.97% url/whatwg-url-canParse.js n=1000000 type='file' *** 48.97 % ±4.52% ±6.02% ±7.87% url/whatwg-url-canParse.js n=1000000 type='idn' -1.21 % ±1.84% ±2.45% ±3.19% url/whatwg-url-canParse.js n=1000000 type='javascript' *** 43.10 % ±4.27% ±5.73% ±7.56% url/whatwg-url-canParse.js n=1000000 type='long' 0.75 % ±2.14% ±2.85% ±3.71% url/whatwg-url-canParse.js n=1000000 type='percent' *** 20.03 % ±2.20% ±2.93% ±3.82% url/whatwg-url-canParse.js n=1000000 type='short' *** 43.81 % ±6.36% ±8.50% ±11.15% url/whatwg-url-canParse.js n=1000000 type='ws' *** 33.83 % ±2.79% ±3.72% ±4.87% 

Also this is my second c++ PR, please go easy on me. 😄

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/url

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 13, 2023
Copy link
Member

@anonriganonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add the tests?

@anonriganonrig added whatwg-url Issues and PRs related to the WHATWG URL implementation. performance Issues and PRs related to the performance of Node.js. labels Apr 13, 2023
@anonriganonrig added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Apr 13, 2023
@anonrig
Copy link
Member

@KhafraDev Can you also run a benchmark CI on this PR?

@anonriganonrig added the needs-benchmark-ci PR that need a benchmark CI run. label Apr 13, 2023
@nodejs-github-bot

This comment was marked as duplicate.

@nodejs-github-bot
Copy link
Collaborator

@anonriganonrig added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 14, 2023
@anonriganonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 20, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 20, 2023
@nodejs-github-botnodejs-github-bot merged commit 6675505 into nodejs:mainApr 20, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 6675505

@KhafraDevKhafraDev deleted the canparse-fastapi branch April 20, 2023 16:57
targos pushed a commit that referenced this pull request May 2, 2023
PR-URL: #47552 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-benchmark-ciPR that need a benchmark CI run.needs-ciPRs that need a full CI run.performanceIssues and PRs related to the performance of Node.js.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@KhafraDev@nodejs-github-bot@anonrig@bnoordhuis@VoltrexKeyva@danielleadams