Uh oh!
There was an error while loading. Please reload this page.
benchmark: add a benchmark for URLSearchParams creation and toString() - #46810
Conversation
debadree25
commented
Feb 24, 2023
I am also trying to improve the perf of confidence improvement accuracy (*) (**) (***)url/url-searchparams-toString.js n=1000000 type='array' *** 23.29 % ±4.91% ±6.54% ±8.51%url/url-searchparams-toString.js n=1000000 type='encodelast' -4.55 % ±4.63% ±6.16% ±8.03%url/url-searchparams-toString.js n=1000000 type='encodemany' * -4.37 % ±3.99% ±5.31% ±6.92%url/url-searchparams-toString.js n=1000000 type='multiprimitives' -4.40 % ±4.43% ±5.90% ±7.68%url/url-searchparams-toString.js n=1000000 type='noencode' -1.37 % ±4.41% ±5.87% ±7.64%Trying to follow the cues from the code of https://github.com/anonrig/fast-querystring but it seems the main bottleneck lies in the regex checking over Line 78 in f15896c which is required for spec compliance I believe? so cannot entirely copy the code from https://github.com/anonrig/fast-querystring too? If anyone has any more ideas would be grateful!! |
There was a problem hiding this comment.
If you are only testing the performance of toString, it feels like initialization should not be inside the bench.
There was a problem hiding this comment.
Maybe we should spilt it into two, there is also no benchmark for the creation of the URLSearchParams object would that be good?
Uh oh!
There was an error while loading. Please reload this page.
1c52b18 to
b2bd057Comparedebadree25
commented
Feb 24, 2023
Used all types of possible parameter types for |
anonrig
commented
Feb 26, 2023
cc @nodejs/performance @nodejs/url |
nodejs-github-bot
commented
Feb 27, 2023
mcollina
left a comment
There was a problem hiding this comment.
I think it might be more useful to compare it against querystring than on itself.
debadree25
commented
Feb 27, 2023
Is there any example of comparative benchmarks with other functions in our benchmark tests? |
debadree25
commented
Feb 27, 2023
Ok we already have |
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
commented
Mar 12, 2023
nodejs-github-bot
commented
Mar 13, 2023
Landed in 28c9fb9 |
Refs: nodejs/performance#56 PR-URL: #46810 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Refs: nodejs/performance#56 PR-URL: #46810 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Refs: nodejs/performance#56 PR-URL: #46810 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Was trying to work on nodejs/performance#56 noticed there is no benchmark on
URLSearchParams.toString()hence adding one same asbenchmark/querystring/querystring-stringify.jsRefs: nodejs/performance#56