Skip to content

querystring: improve querystring unescapeBuffer perf

Refactored the unescapeBuffer function in order to simplify it, and also to improve the performance.

The benchmark:

querystring/querystring-unescapebuffer.js n=1000000 input="%20%21%2..."
   18.10 %        *** 6.671620e-29
querystring/querystring-unescapebuffer.js n=1000000 input="there%20..."
   2.75 %          * 1.775320e-02
querystring/querystring-unescapebuffer.js n=1000000 input="there%2Q..."
   34.12 %        *** 8.074612e-25
querystring/querystring-unescapebuffer.js n=1000000 input="there is..."
   27.92 %        *** 4.923348e-29
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

Merge request reports

Loading