| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
Why didn't you use primordials here?
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe I'm missing something but in this file the usage of primordials seems inconsistent now
Sorry, something went wrong.
There was a problem hiding this comment.
I didn't use primordials because I forgot one spot :) changing it now!
I had the same doubt as you, the file is using very few primordials. I will create another PR to convert the whole file to be using them as much as possible
Sorry, something went wrong.
There was a problem hiding this comment.
Ah no problem I was just curious if there was a reason :)
Sorry, something went wrong.
There was a problem hiding this comment.
I guess this got slower when # exists, but looks like an ok compromise
Sorry, something went wrong.
There was a problem hiding this comment.
| search = search.replace(/#/g, '%23'); | |
| search = search.replaceAll('#', '%23'); |
Sorry, something went wrong.
There was a problem hiding this comment.
By the way this is because replaceAll has similar or better performance than a global static regexp, because it doesn't need to be compiled
To lower regexp usage I had made a PR replacing all these a while ago, so I think you can safely replace with replaceAll
Sorry, something went wrong.
There was a problem hiding this comment.
fascinating, it makes sense :) updated it with StringPrototypeReplaceAll
Sorry, something went wrong.
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## main #57099 +/- ##
=======================================
Coverage 89.09% 89.09%
=======================================
Files 665 665
Lines 193249 193252 +3
Branches 37231 37222 -9
=======================================
+ Hits 172175 172184 +9
+ Misses 13802 13799 -3
+ Partials 7272 7269 -3
... and 26 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
@nodejs/performance can someone start a url benchmark ci? |
Sorry, something went wrong.
|
https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1657/
|
Sorry, something went wrong.
confidence improvement accuracy (*) (**) (***)
url/legacy-url-get-prop.js e=1 type='auth' *** 40.91 % ±2.99% ±3.98% ±5.18%
url/legacy-url-get-prop.js e=1 type='dot' *** 37.05 % ±3.06% ±4.08% ±5.34%
url/legacy-url-get-prop.js e=1 type='file' *** 43.58 % ±4.31% ±5.75% ±7.50%
url/legacy-url-get-prop.js e=1 type='idn' *** 38.39 % ±4.75% ±6.35% ±8.32%
url/legacy-url-get-prop.js e=1 type='javascript' -0.45 % ±2.77% ±3.68% ±4.79%
url/legacy-url-get-prop.js e=1 type='long' *** 36.61 % ±6.59% ±8.82% ±11.60%
url/legacy-url-get-prop.js e=1 type='percent' *** 43.77 % ±3.78% ±5.05% ±6.61%
url/legacy-url-get-prop.js e=1 type='short' *** 37.44 % ±4.57% ±6.11% ±8.01%
url/legacy-url-get-prop.js e=1 type='wpt' -5.54 % ±7.36% ±9.79% ±12.74%
url/legacy-url-get-prop.js e=1 type='ws' *** 44.40 % ±3.45% ±4.59% ±5.98%
url/legacy-url-parse.js e=1 type='auth' *** 5.89 % ±2.65% ±3.56% ±4.70%
url/legacy-url-parse.js e=1 type='dot' *** 4.11 % ±1.93% ±2.57% ±3.35%
url/legacy-url-parse.js e=1 type='file' *** 3.82 % ±1.92% ±2.56% ±3.33%
url/legacy-url-parse.js e=1 type='idn' 0.71 % ±3.62% ±4.82% ±6.28%
url/legacy-url-parse.js e=1 type='javascript' *** 5.94 % ±1.30% ±1.73% ±2.26%
url/legacy-url-parse.js e=1 type='long' 0.38 % ±2.32% ±3.09% ±4.03%
url/legacy-url-parse.js e=1 type='percent' *** 4.46 % ±1.23% ±1.64% ±2.14%
url/legacy-url-parse.js e=1 type='short' 1.10 % ±1.32% ±1.76% ±2.30%
url/legacy-url-parse.js e=1 type='wpt' *** 10.19 % ±4.03% ±5.39% ±7.09%
url/legacy-url-parse.js e=1 type='ws' *** 4.36 % ±1.70% ±2.28% ±2.99%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='altspaces' ** 0.66 % ±0.40% ±0.53% ±0.69%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='encodefake' -0.08 % ±0.59% ±0.78% ±1.02%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='encodelast' 0.49 % ±0.77% ±1.03% ±1.34%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='encodemany' -0.17 % ±0.33% ±0.44% ±0.58%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='manyblankpairs' -0.20 % ±0.61% ±0.81% ±1.05%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='manypairs' 1.20 % ±1.26% ±1.67% ±2.18%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='multicharsep' -0.25 % ±0.64% ±0.85% ±1.11%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='multivalue' -0.04 % ±0.99% ±1.32% ±1.72%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='multivaluemany' -0.64 % ±0.95% ±1.26% ±1.64%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='legacy' searchParam='noencode' -0.09 % ±0.68% ±0.91% ±1.18%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='altspaces' 0.18 % ±0.63% ±0.85% ±1.10%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='encodefake' 0.14 % ±0.71% ±0.94% ±1.23%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='encodelast' -0.13 % ±0.43% ±0.57% ±0.75%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='encodemany' -0.16 % ±0.50% ±0.67% ±0.87%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='manyblankpairs' -0.00 % ±0.79% ±1.05% ±1.37%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='manypairs' 0.10 % ±0.80% ±1.07% ±1.39%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='multicharsep' -0.04 % ±0.74% ±0.99% ±1.29%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='multivalue' -0.00 % ±0.69% ±0.91% ±1.19%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='multivaluemany' -0.16 % ±0.26% ±0.34% ±0.44%
url/legacy-vs-whatwg-url-searchparams-parse.js n=1000000 method='whatwg' searchParam='noencode' -0.21 % ±0.66% ±0.88% ±1.14%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='altspaces' 0.22 % ±0.35% ±0.47% ±0.61%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='encodefake' 0.29 % ±0.56% ±0.74% ±0.96%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='encodelast' 0.22 % ±0.69% ±0.92% ±1.19%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='encodemany' -0.39 % ±0.68% ±0.91% ±1.18%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='manyblankpairs' -0.68 % ±2.63% ±3.49% ±4.55%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='manypairs' -0.49 % ±1.75% ±2.33% ±3.03%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='multicharsep' -0.41 % ±0.56% ±0.75% ±0.98%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='multivalue' -0.12 % ±0.68% ±0.90% ±1.17%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='multivaluemany' -0.23 % ±0.95% ±1.26% ±1.64%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='legacy' searchParam='noencode' 0.25 % ±0.67% ±0.89% ±1.16%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='altspaces' -0.05 % ±0.43% ±0.58% ±0.75%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='encodefake' 0.32 % ±0.63% ±0.84% ±1.10%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='encodelast' -0.09 % ±0.51% ±0.67% ±0.88%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='encodemany' -0.06 % ±0.55% ±0.73% ±0.95%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='manyblankpairs' 1.42 % ±4.50% ±5.99% ±7.80%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='manypairs' 0.22 % ±0.83% ±1.10% ±1.43%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='multicharsep' -0.03 % ±0.64% ±0.85% ±1.11%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='multivalue' -0.16 % ±0.47% ±0.62% ±0.81%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='multivaluemany' 0.47 % ±0.47% ±0.63% ±0.82%
url/legacy-vs-whatwg-url-searchparams-serialize.js n=1000000 method='whatwg' searchParam='noencode' 0.51 % ±0.69% ±0.92% ±1.19%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='auth' -2.33 % ±3.12% ±4.17% ±5.45%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='dot' -2.23 % ±3.23% ±4.32% ±5.69%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='file' -1.31 % ±2.77% ±3.71% ±4.88%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='idn' -2.39 % ±2.99% ±4.00% ±5.23%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='javascript' *** -48.81 % ±1.16% ±1.54% ±2.01%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='long' *** -27.67 % ±4.02% ±5.36% ±7.00%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='percent' 1.84 % ±2.27% ±3.04% ±3.99%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='short' 1.17 % ±4.15% ±5.56% ±7.31%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='wpt' 0.93 % ±1.94% ±2.58% ±3.36%
url/legacy-vs-whatwg-url-serialize.js e=1 method='legacy' type='ws' *** 5.19 % ±2.16% ±2.88% ±3.76%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='auth' 1.37 % ±1.69% ±2.24% ±2.92%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='dot' 0.64 % ±2.10% ±2.80% ±3.65%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='file' 1.70 % ±2.95% ±3.93% ±5.12%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='idn' 0.42 % ±4.92% ±6.55% ±8.53%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='javascript' -0.73 % ±2.79% ±3.74% ±4.91%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='long' -1.33 % ±2.05% ±2.73% ±3.56%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='percent' 0.96 % ±3.67% ±4.88% ±6.36%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='short' -2.67 % ±3.63% ±4.85% ±6.36%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='wpt' -0.63 % ±3.11% ±4.17% ±5.49%
url/legacy-vs-whatwg-url-serialize.js e=1 method='whatwg' type='ws' -0.85 % ±2.24% ±2.98% ±3.88%
url/url-format.js n=25000000 type='file' *** 58.17 % ±1.38% ±1.84% ±2.41%
url/url-format.js n=25000000 type='slashes' *** 120.85 % ±3.79% ±5.10% ±6.76%
url/url-parse.js n=10000000 type='escaped' *** 15.79 % ±0.39% ±0.52% ±0.68%
url/url-parse.js n=10000000 type='normal' *** 13.94 % ±0.49% ±0.66% ±0.86%
url/url-resolve.js n=100000 path='down' href='auth' *** 12.13 % ±0.47% ±0.62% ±0.81%
url/url-resolve.js n=100000 path='down' href='dot' *** 13.59 % ±0.45% ±0.60% ±0.78%
url/url-resolve.js n=100000 path='down' href='file' *** 16.80 % ±0.48% ±0.63% ±0.83%
url/url-resolve.js n=100000 path='down' href='idn' *** 10.30 % ±1.03% ±1.38% ±1.81%
url/url-resolve.js n=100000 path='down' href='javascript' *** 19.46 % ±0.56% ±0.74% ±0.97%
url/url-resolve.js n=100000 path='down' href='long' *** 14.30 % ±0.23% ±0.31% ±0.41%
url/url-resolve.js n=100000 path='down' href='noscheme' *** 20.12 % ±0.62% ±0.83% ±1.08%
url/url-resolve.js n=100000 path='down' href='percent' *** 15.94 % ±0.49% ±0.66% ±0.86%
url/url-resolve.js n=100000 path='down' href='short' *** 13.87 % ±0.36% ±0.48% ±0.63%
url/url-resolve.js n=100000 path='down' href='ws' *** 14.70 % ±0.38% ±0.50% ±0.65%
url/url-resolve.js n=100000 path='foo/bar' href='auth' *** 11.79 % ±0.37% ±0.50% ±0.65%
url/url-resolve.js n=100000 path='foo/bar' href='dot' *** 14.08 % ±0.24% ±0.32% ±0.42%
url/url-resolve.js n=100000 path='foo/bar' href='file' *** 18.32 % ±0.52% ±0.69% ±0.91%
url/url-resolve.js n=100000 path='foo/bar' href='idn' *** 11.97 % ±0.51% ±0.68% ±0.89%
url/url-resolve.js n=100000 path='foo/bar' href='javascript' *** 23.02 % ±0.72% ±0.96% ±1.25%
url/url-resolve.js n=100000 path='foo/bar' href='long' *** 14.43 % ±0.20% ±0.27% ±0.35%
url/url-resolve.js n=100000 path='foo/bar' href='noscheme' *** 21.31 % ±0.41% ±0.55% ±0.72%
url/url-resolve.js n=100000 path='foo/bar' href='percent' *** 17.09 % ±0.46% ±0.61% ±0.80%
url/url-resolve.js n=100000 path='foo/bar' href='short' *** 14.27 % ±0.41% ±0.55% ±0.71%
url/url-resolve.js n=100000 path='foo/bar' href='ws' *** 16.27 % ±0.45% ±0.60% ±0.79%
url/url-resolve.js n=100000 path='sibling' href='auth' *** 11.81 % ±0.32% ±0.42% ±0.55%
url/url-resolve.js n=100000 path='sibling' href='dot' *** 13.34 % ±0.33% ±0.44% ±0.57%
url/url-resolve.js n=100000 path='sibling' href='file' *** 16.04 % ±0.56% ±0.75% ±0.98%
url/url-resolve.js n=100000 path='sibling' href='idn' *** 11.46 % ±0.51% ±0.69% ±0.91%
url/url-resolve.js n=100000 path='sibling' href='javascript' *** 19.01 % ±0.47% ±0.63% ±0.82%
url/url-resolve.js n=100000 path='sibling' href='long' *** 13.85 % ±0.31% ±0.42% ±0.55%
url/url-resolve.js n=100000 path='sibling' href='noscheme' *** 19.73 % ±0.36% ±0.48% ±0.63%
url/url-resolve.js n=100000 path='sibling' href='percent' *** 13.40 % ±0.38% ±0.51% ±0.67%
url/url-resolve.js n=100000 path='sibling' href='short' *** 13.98 % ±0.45% ±0.61% ±0.79%
url/url-resolve.js n=100000 path='sibling' href='ws' *** 14.59 % ±0.25% ±0.33% ±0.43%
url/url-resolve.js n=100000 path='up' href='auth' *** 12.53 % ±0.32% ±0.43% ±0.56%
url/url-resolve.js n=100000 path='up' href='dot' *** 14.49 % ±0.62% ±0.83% ±1.09%
url/url-resolve.js n=100000 path='up' href='file' *** 16.50 % ±0.32% ±0.43% ±0.56%
url/url-resolve.js n=100000 path='up' href='idn' *** 11.13 % ±0.40% ±0.53% ±0.69%
url/url-resolve.js n=100000 path='up' href='javascript' *** 22.27 % ±0.47% ±0.62% ±0.81%
url/url-resolve.js n=100000 path='up' href='long' *** 13.33 % ±0.16% ±0.21% ±0.28%
url/url-resolve.js n=100000 path='up' href='noscheme' *** 19.85 % ±0.49% ±0.65% ±0.85%
url/url-resolve.js n=100000 path='up' href='percent' *** 17.39 % ±0.36% ±0.48% ±0.62%
url/url-resolve.js n=100000 path='up' href='short' *** 14.72 % ±0.30% ±0.40% ±0.52%
url/url-resolve.js n=100000 path='up' href='ws' *** 16.73 % ±0.23% ±0.30% ±0.39%
url/url-resolve.js n=100000 path='withscheme' href='auth' *** 11.22 % ±0.38% ±0.50% ±0.65%
url/url-resolve.js n=100000 path='withscheme' href='dot' *** 15.68 % ±0.34% ±0.45% ±0.59%
url/url-resolve.js n=100000 path='withscheme' href='file' *** 15.82 % ±0.70% ±0.93% ±1.21%
url/url-resolve.js n=100000 path='withscheme' href='idn' *** 11.40 % ±1.11% ±1.48% ±1.93%
url/url-resolve.js n=100000 path='withscheme' href='javascript' *** 18.79 % ±0.57% ±0.75% ±0.98%
url/url-resolve.js n=100000 path='withscheme' href='long' *** 10.40 % ±0.30% ±0.40% ±0.53%
url/url-resolve.js n=100000 path='withscheme' href='noscheme' *** 16.80 % ±0.59% ±0.79% ±1.03%
url/url-resolve.js n=100000 path='withscheme' href='percent' *** 13.71 % ±0.53% ±0.71% ±0.93%
url/url-resolve.js n=100000 path='withscheme' href='short' *** 13.12 % ±0.44% ±0.59% ±0.77%
url/url-resolve.js n=100000 path='withscheme' href='ws' *** 15.61 % ±0.46% ±0.62% ±0.81%
url/url-searchparams-append.js n=1000 type='URL' 1.68 % ±2.78% ±3.70% ±4.82%
url/url-searchparams-append.js n=1000 type='URLSearchParams' 2.29 % ±3.44% ±4.58% ±5.96%
url/url-searchparams-append.js n=1000000 type='URL' -5.13 % ±6.59% ±8.78% ±11.45%
url/url-searchparams-append.js n=1000000 type='URLSearchParams' 3.19 % ±4.83% ±6.45% ±8.43%
url/url-searchparams-creation.js n=1000000 inputType='iterable' type='array' 0.25 % ±1.04% ±1.38% ±1.80%
url/url-searchparams-creation.js n=1000000 inputType='iterable' type='encodelast' 0.03 % ±1.50% ±1.99% ±2.59%
url/url-searchparams-creation.js n=1000000 inputType='iterable' type='encodemany' -1.14 % ±1.53% ±2.04% ±2.67%
url/url-searchparams-creation.js n=1000000 inputType='iterable' type='multiprimitives' 0.25 % ±1.75% ±2.33% ±3.04%
url/url-searchparams-creation.js n=1000000 inputType='iterable' type='noencode' 0.92 % ±1.54% ±2.05% ±2.67%
url/url-searchparams-creation.js n=1000000 inputType='object' type='array' 0.61 % ±0.74% ±0.99% ±1.28%
url/url-searchparams-creation.js n=1000000 inputType='object' type='encodelast' * -0.92 % ±0.83% ±1.11% ±1.45%
url/url-searchparams-creation.js n=1000000 inputType='object' type='encodemany' -0.44 % ±0.93% ±1.24% ±1.61%
url/url-searchparams-creation.js n=1000000 inputType='object' type='multiprimitives' 0.81 % ±0.92% ±1.22% ±1.60%
url/url-searchparams-creation.js n=1000000 inputType='object' type='noencode' -0.07 % ±0.96% ±1.28% ±1.67%
url/url-searchparams-creation.js n=1000000 inputType='string' type='array' -0.98 % ±1.05% ±1.40% ±1.82%
url/url-searchparams-creation.js n=1000000 inputType='string' type='encodelast' -0.92 % ±1.20% ±1.59% ±2.07%
url/url-searchparams-creation.js n=1000000 inputType='string' type='encodemany' -0.76 % ±1.20% ±1.59% ±2.07%
url/url-searchparams-creation.js n=1000000 inputType='string' type='multiprimitives' 0.06 % ±0.89% ±1.18% ±1.54%
url/url-searchparams-creation.js n=1000000 inputType='string' type='noencode' -0.41 % ±0.95% ±1.26% ±1.64%
url/url-searchparams-iteration.js n=1000000 loopMethod='forEach' 1.53 % ±8.28% ±11.02% ±14.35%
url/url-searchparams-iteration.js n=1000000 loopMethod='iterator' 0.86 % ±1.04% ±1.39% ±1.82%
url/url-searchparams-read.js n=20000000 param='nonexistent' accessMethod='get' 0.22 % ±0.36% ±0.48% ±0.63%
url/url-searchparams-read.js n=20000000 param='nonexistent' accessMethod='getAll' * -0.53 % ±0.42% ±0.56% ±0.72%
url/url-searchparams-read.js n=20000000 param='nonexistent' accessMethod='has' 0.78 % ±2.44% ±3.28% ±4.34%
url/url-searchparams-read.js n=20000000 param='one' accessMethod='get' * 3.28 % ±2.89% ±3.86% ±5.06%
url/url-searchparams-read.js n=20000000 param='one' accessMethod='getAll' 0.63 % ±0.81% ±1.08% ±1.41%
url/url-searchparams-read.js n=20000000 param='one' accessMethod='has' -1.19 % ±2.05% ±2.73% ±3.56%
url/url-searchparams-read.js n=20000000 param='three' accessMethod='get' 1.40 % ±1.98% ±2.64% ±3.45%
url/url-searchparams-read.js n=20000000 param='three' accessMethod='getAll' 0.69 % ±1.10% ±1.47% ±1.91%
url/url-searchparams-read.js n=20000000 param='three' accessMethod='has' 0.61 % ±1.99% ±2.65% ±3.45%
url/url-searchparams-read.js n=20000000 param='two' accessMethod='get' -0.29 % ±2.32% ±3.09% ±4.02%
url/url-searchparams-read.js n=20000000 param='two' accessMethod='getAll' -0.76 % ±1.17% ±1.56% ±2.03%
url/url-searchparams-read.js n=20000000 param='two' accessMethod='has' 1.36 % ±2.36% ±3.14% ±4.10%
url/url-searchparams-sort.js n=1000000 type='almostsorted' 1.10 % ±1.72% ±2.30% ±3.02%
url/url-searchparams-sort.js n=1000000 type='empty' -2.81 % ±3.15% ±4.20% ±5.48%
url/url-searchparams-sort.js n=1000000 type='long' -0.34 % ±0.69% ±0.92% ±1.20%
url/url-searchparams-sort.js n=1000000 type='random' 0.65 % ±1.74% ±2.32% ±3.02%
url/url-searchparams-sort.js n=1000000 type='reversed' 0.02 % ±1.61% ±2.14% ±2.78%
url/url-searchparams-sort.js n=1000000 type='short' 1.41 % ±3.07% ±4.09% ±5.33%
url/url-searchparams-sort.js n=1000000 type='sorted' -0.67 % ±1.05% ±1.40% ±1.82%
url/url-searchparams-sort.js n=1000000 type='wpt' 1.45 % ±2.46% ±3.27% ±4.26%
url/url-searchparams-toString.js n=1000000 inputType='iterable' type='array' -0.07 % ±0.45% ±0.60% ±0.79%
url/url-searchparams-toString.js n=1000000 inputType='iterable' type='encodelast' -0.07 % ±0.44% ±0.59% ±0.77%
url/url-searchparams-toString.js n=1000000 inputType='iterable' type='encodemany' 0.23 % ±0.59% ±0.78% ±1.02%
url/url-searchparams-toString.js n=1000000 inputType='iterable' type='multiprimitives' -0.05 % ±0.47% ±0.63% ±0.82%
url/url-searchparams-toString.js n=1000000 inputType='iterable' type='noencode' 0.11 % ±0.67% ±0.89% ±1.16%
url/url-searchparams-toString.js n=1000000 inputType='object' type='array' 0.49 % ±0.52% ±0.69% ±0.89%
url/url-searchparams-toString.js n=1000000 inputType='object' type='encodelast' 0.15 % ±0.29% ±0.39% ±0.51%
url/url-searchparams-toString.js n=1000000 inputType='object' type='encodemany' -0.06 % ±0.43% ±0.58% ±0.76%
url/url-searchparams-toString.js n=1000000 inputType='object' type='multiprimitives' 0.08 % ±0.59% ±0.79% ±1.03%
url/url-searchparams-toString.js n=1000000 inputType='object' type='noencode' 0.22 % ±0.46% ±0.61% ±0.80%
url/url-searchparams-toString.js n=1000000 inputType='string' type='array' -0.29 % ±0.46% ±0.61% ±0.79%
url/url-searchparams-toString.js n=1000000 inputType='string' type='encodelast' 0.41 % ±0.45% ±0.59% ±0.77%
url/url-searchparams-toString.js n=1000000 inputType='string' type='encodemany' ** -0.93 % ±0.53% ±0.71% ±0.93%
url/url-searchparams-toString.js n=1000000 inputType='string' type='multiprimitives' * 0.43 % ±0.43% ±0.57% ±0.75%
url/url-searchparams-toString.js n=1000000 inputType='string' type='noencode' -0.12 % ±0.34% ±0.46% ±0.60%
url/url-searchparams-update.js n=1000000 property='hash' searchParams='false' -0.08 % ±0.26% ±0.34% ±0.45%
url/url-searchparams-update.js n=1000000 property='hash' searchParams='true' 0.14 % ±0.41% ±0.55% ±0.71%
url/url-searchparams-update.js n=1000000 property='pathname' searchParams='false' 0.13 % ±0.22% ±0.30% ±0.38%
url/url-searchparams-update.js n=1000000 property='pathname' searchParams='true' * 0.30 % ±0.26% ±0.35% ±0.45%
url/url-searchparams-update.js n=1000000 property='search' searchParams='false' 0.07 % ±0.40% ±0.53% ±0.69%
url/url-searchparams-update.js n=1000000 property='search' searchParams='true' 0.08 % ±0.30% ±0.39% ±0.51%
url/urlpattern-parse.js n=100000 pattern='"[https://(sub.)?example(.com/)foo](https://(sub.)/?example(.com/)foo)"' -0.05 % ±0.27% ±0.36% ±0.48%
url/urlpattern-parse.js n=100000 pattern='{"hostname":"xn--caf-dma.com"}' 0.08 % ±0.30% ±0.40% ±0.52%
url/urlpattern-parse.js n=100000 pattern='{"pathname":"/([[a-z]--a])"}' 0.06 % ±0.67% ±0.89% ±1.16%
url/urlpattern-parse.js n=100000 pattern='{"pathname":"/foo","search":"bar","hash":"baz","baseURL":"https://example.com:8080/"}' -0.30 % ±0.32% ±0.42% ±0.55%
url/urlpattern-test.js n=100000 pattern='"[https://(sub.)?example(.com/)foo](https://(sub.)/?example(.com/)foo)"' 0.09 % ±0.67% ±0.90% ±1.18%
url/urlpattern-test.js n=100000 pattern='{"hostname":"xn--caf-dma.com"}' 0.35 % ±0.43% ±0.58% ±0.75%
url/urlpattern-test.js n=100000 pattern='{"pathname":"/([[a-z]--a])"}' 0.02 % ±0.60% ±0.79% ±1.03%
url/urlpattern-test.js n=100000 pattern='{"pathname":"/foo","search":"bar","hash":"baz","baseURL":"https://example.com:8080/"}' -0.16 % ±0.49% ±0.66% ±0.86%
url/whatwg-url-canParse.js n=1000000 type='auth' 0.42 % ±0.57% ±0.76% ±0.99%
url/whatwg-url-canParse.js n=1000000 type='dot' -0.15 % ±0.76% ±1.01% ±1.32%
url/whatwg-url-canParse.js n=1000000 type='file' 0.09 % ±0.65% ±0.87% ±1.13%
url/whatwg-url-canParse.js n=1000000 type='idn' 0.11 % ±0.11% ±0.15% ±0.20%
url/whatwg-url-canParse.js n=1000000 type='javascript' -0.48 % ±1.19% ±1.58% ±2.06%
url/whatwg-url-canParse.js n=1000000 type='long' * 0.43 % ±0.38% ±0.51% ±0.66%
url/whatwg-url-canParse.js n=1000000 type='percent' -0.00 % ±0.35% ±0.47% ±0.62%
url/whatwg-url-canParse.js n=1000000 type='short' 0.50 % ±0.70% ±0.93% ±1.21%
url/whatwg-url-canParse.js n=1000000 type='ws' 0.50 % ±0.75% ±1.00% ±1.31%
url/whatwg-url-get-prop.js e=1 type='auth' -0.29 % ±1.93% ±2.57% ±3.35%
url/whatwg-url-get-prop.js e=1 type='dot' -1.05 % ±2.63% ±3.50% ±4.56%
url/whatwg-url-get-prop.js e=1 type='file' 1.02 % ±2.57% ±3.42% ±4.46%
url/whatwg-url-get-prop.js e=1 type='idn' -0.97 % ±1.79% ±2.38% ±3.10%
url/whatwg-url-get-prop.js e=1 type='javascript' 2.58 % ±3.06% ±4.07% ±5.30%
url/whatwg-url-get-prop.js e=1 type='long' -3.15 % ±3.43% ±4.58% ±5.99%
url/whatwg-url-get-prop.js e=1 type='percent' 0.35 % ±2.63% ±3.50% ±4.56%
url/whatwg-url-get-prop.js e=1 type='short' 1.43 % ±2.82% ±3.76% ±4.90%
url/whatwg-url-get-prop.js e=1 type='wpt' 0.03 % ±3.38% ±4.51% ±5.87%
url/whatwg-url-get-prop.js e=1 type='ws' -0.01 % ±2.04% ±2.72% ±3.54%
url/whatwg-url-idna.js n=5000000 to='ascii' domain='all' 0.09 % ±0.47% ±0.62% ±0.82%
url/whatwg-url-idna.js n=5000000 to='ascii' domain='empty' 1.41 % ±2.40% ±3.21% ±4.24%
url/whatwg-url-idna.js n=5000000 to='ascii' domain='none' 0.04 % ±0.17% ±0.22% ±0.29%
url/whatwg-url-idna.js n=5000000 to='ascii' domain='nonstring' -0.04 % ±0.62% ±0.82% ±1.07%
url/whatwg-url-idna.js n=5000000 to='ascii' domain='some' 0.12 % ±0.34% ±0.45% ±0.60%
url/whatwg-url-idna.js n=5000000 to='unicode' domain='all' 0.11 % ±0.17% ±0.23% ±0.31%
url/whatwg-url-idna.js n=5000000 to='unicode' domain='empty' -0.10 % ±0.98% ±1.30% ±1.69%
url/whatwg-url-idna.js n=5000000 to='unicode' domain='none' -0.06 % ±0.17% ±0.22% ±0.29%
url/whatwg-url-idna.js n=5000000 to='unicode' domain='nonstring' -0.07 % ±0.58% ±0.77% ±1.00%
url/whatwg-url-idna.js n=5000000 to='unicode' domain='some' -0.07 % ±0.20% ±0.26% ±0.34%
url/whatwg-url-parse.js e=1 type='auth' withBase='false' -3.88 % ±4.40% ±5.87% ±7.67%
url/whatwg-url-parse.js e=1 type='auth' withBase='true' 0.33 % ±2.28% ±3.05% ±3.99%
url/whatwg-url-parse.js e=1 type='dot' withBase='false' -1.11 % ±3.57% ±4.75% ±6.19%
url/whatwg-url-parse.js e=1 type='dot' withBase='true' 0.70 % ±2.21% ±2.96% ±3.87%
url/whatwg-url-parse.js e=1 type='file' withBase='false' 1.99 % ±3.88% ±5.18% ±6.78%
url/whatwg-url-parse.js e=1 type='file' withBase='true' 0.84 % ±1.35% ±1.79% ±2.34%
url/whatwg-url-parse.js e=1 type='idn' withBase='false' 0.29 % ±2.30% ±3.06% ±3.99%
url/whatwg-url-parse.js e=1 type='idn' withBase='true' 1.24 % ±2.71% ±3.64% ±4.79%
url/whatwg-url-parse.js e=1 type='javascript' withBase='false' * 3.34 % ±2.75% ±3.69% ±4.88%
url/whatwg-url-parse.js e=1 type='javascript' withBase='true' -0.36 % ±2.25% ±3.00% ±3.91%
url/whatwg-url-parse.js e=1 type='long' withBase='false' 0.14 % ±1.30% ±1.74% ±2.26%
url/whatwg-url-parse.js e=1 type='long' withBase='true' 0.31 % ±2.31% ±3.07% ±4.00%
url/whatwg-url-parse.js e=1 type='percent' withBase='false' 1.29 % ±3.95% ±5.26% ±6.87%
url/whatwg-url-parse.js e=1 type='percent' withBase='true' -2.17 % ±2.32% ±3.12% ±4.11%
url/whatwg-url-parse.js e=1 type='short' withBase='false' -1.24 % ±4.06% ±5.40% ±7.03%
url/whatwg-url-parse.js e=1 type='short' withBase='true' 0.53 % ±2.64% ±3.51% ±4.58%
url/whatwg-url-parse.js e=1 type='wpt' withBase='false' 0.50 % ±2.93% ±3.90% ±5.08%
url/whatwg-url-parse.js e=1 type='wpt' withBase='true' 1.78 % ±2.57% ±3.42% ±4.45%
url/whatwg-url-parse.js e=1 type='ws' withBase='false' -3.84 % ±4.17% ±5.57% ±7.31%
url/whatwg-url-parse.js e=1 type='ws' withBase='true' -0.45 % ±3.11% ±4.14% ±5.39%
url/whatwg-url-properties.js prop='hash' e=1 type='wpt' withBase='false' -0.51 % ±2.87% ±3.83% ±5.00%
url/whatwg-url-properties.js prop='hash' e=1 type='wpt' withBase='true' -1.82 % ±2.59% ±3.46% ±4.53%
url/whatwg-url-properties.js prop='host' e=1 type='wpt' withBase='false' -0.29 % ±2.98% ±3.97% ±5.17%
url/whatwg-url-properties.js prop='host' e=1 type='wpt' withBase='true' 0.91 % ±3.19% ±4.25% ±5.54%
url/whatwg-url-properties.js prop='hostname' e=1 type='wpt' withBase='false' -0.33 % ±1.69% ±2.26% ±2.94%
url/whatwg-url-properties.js prop='hostname' e=1 type='wpt' withBase='true' -0.15 % ±2.35% ±3.13% ±4.08%
url/whatwg-url-properties.js prop='href' e=1 type='wpt' withBase='false' -2.57 % ±3.46% ±4.63% ±6.09%
url/whatwg-url-properties.js prop='href' e=1 type='wpt' withBase='true' -3.16 % ±4.31% ±5.74% ±7.47%
url/whatwg-url-properties.js prop='origin' e=1 type='wpt' withBase='false' * -2.54 % ±2.48% ±3.30% ±4.29%
url/whatwg-url-properties.js prop='origin' e=1 type='wpt' withBase='true' 1.08 % ±3.75% ±5.00% ±6.51%
url/whatwg-url-properties.js prop='password' e=1 type='wpt' withBase='false' -1.75 % ±3.41% ±4.56% ±5.97%
url/whatwg-url-properties.js prop='password' e=1 type='wpt' withBase='true' -2.71 % ±4.00% ±5.36% ±7.04%
url/whatwg-url-properties.js prop='pathname' e=1 type='wpt' withBase='false' -1.25 % ±2.46% ±3.28% ±4.29%
url/whatwg-url-properties.js prop='pathname' e=1 type='wpt' withBase='true' -0.76 % ±2.30% ±3.07% ±4.03%
url/whatwg-url-properties.js prop='port' e=1 type='wpt' withBase='false' 1.03 % ±2.31% ±3.08% ±4.04%
url/whatwg-url-properties.js prop='port' e=1 type='wpt' withBase='true' -0.85 % ±3.05% ±4.08% ±5.34%
url/whatwg-url-properties.js prop='protocol' e=1 type='wpt' withBase='false' -0.04 % ±1.61% ±2.15% ±2.80%
url/whatwg-url-properties.js prop='protocol' e=1 type='wpt' withBase='true' -0.76 % ±2.16% ±2.88% ±3.77%
url/whatwg-url-properties.js prop='search' e=1 type='wpt' withBase='false' 0.01 % ±2.91% ±3.88% ±5.06%
url/whatwg-url-properties.js prop='search' e=1 type='wpt' withBase='true' -1.51 % ±1.96% ±2.63% ±3.44%
url/whatwg-url-properties.js prop='searchParams' e=1 type='wpt' withBase='false' -1.89 % ±3.83% ±5.10% ±6.64%
url/whatwg-url-properties.js prop='searchParams' e=1 type='wpt' withBase='true' -0.25 % ±2.97% ±3.95% ±5.14%
url/whatwg-url-properties.js prop='username' e=1 type='wpt' withBase='false' -0.78 % ±1.50% ±2.00% ±2.64%
url/whatwg-url-properties.js prop='username' e=1 type='wpt' withBase='true' 0.47 % ±2.51% ±3.34% ±4.35%
url/whatwg-url-to-and-from-path.js n=5000000 input='/dev/null?key=param&bool' method='pathToFileURL' -0.21 % ±0.73% ±0.97% ±1.27%
url/whatwg-url-to-and-from-path.js n=5000000 input='/dev/null?key=param&bool#hash' method='pathToFileURL' 0.19 % ±0.24% ±0.32% ±0.42%
url/whatwg-url-to-and-from-path.js n=5000000 input='/dev/null' method='pathToFileURL' -0.40 % ±0.52% ±0.69% ±0.90%
url/whatwg-url-to-and-from-path.js n=5000000 input='file:///dev/null?key=param&bool' method='fileURLToPath' 0.16 % ±0.36% ±0.48% ±0.63%
url/whatwg-url-to-and-from-path.js n=5000000 input='file:///dev/null?key=param&bool' method='pathToFileURL' 0.19 % ±0.35% ±0.46% ±0.60%
url/whatwg-url-to-and-from-path.js n=5000000 input='file:///dev/null?key=param&bool#hash' method='fileURLToPath' 0.16 % ±0.42% ±0.55% ±0.72%
url/whatwg-url-to-and-from-path.js n=5000000 input='file:///dev/null?key=param&bool#hash' method='pathToFileURL' 0.17 % ±0.32% ±0.43% ±0.56%
url/whatwg-url-to-and-from-path.js n=5000000 input='file:///dev/null' method='fileURLToPath' -0.11 % ±0.44% ±0.59% ±0.76%
url/whatwg-url-to-and-from-path.js n=5000000 input='file:///dev/null' method='pathToFileURL' 0.47 % ±1.09% ±1.46% ±1.92%
url/whatwg-url-validity.js e=100000 type='invalid' 0.03 % ±0.60% ±0.80% ±1.04%
url/whatwg-url-validity.js e=100000 type='valid' 0.00 % ±2.24% ±3.00% ±3.93%
Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case, there are 288 comparisons, you can thus
expect the following amount of false-positive results:
14.40 false positives, when considering a 5% risk acceptance (*, **, ***),
2.88 false positives, when considering a 1% risk acceptance (**, ***),
0.29 false positives, when considering a 0.1% risk acceptance (***)
|
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
antything else needed here? |
Sorry, something went wrong.
Sorry, something went wrong.
|
can I please ask for a rerun of the CI? |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #57099 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #57099 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
| Back | FazBrowse Home | New Git URL |
As part of my ongoing review of the assert codebase, I started examining the lib/url.js file and optimizing some straightforward code that could be further refined for better performance.
Here are the benchmark results for the benchmarks/url/url-format.js file:
For type="slashes":
123% improvement
For type="file":
50% improvement