Skip to content

src: implement v8 fast api for url canParse#47552

Merged
nodejs-github-bot merged 6 commits intonodejs:mainfrom
KhafraDev:canparse-fastapi
Apr 20, 2023
Merged

src: implement v8 fast api for url canParse#47552
nodejs-github-bot merged 6 commits intonodejs:mainfrom
KhafraDev:canparse-fastapi

Conversation

@KhafraDev
Copy link
Member

@KhafraDev KhafraDev 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. 😄

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs 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-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants