summaryrefslogtreecommitdiff
path: root/benchmark/url
AgeCommit message (Collapse)Author
2019-07-30benchmark: swap var for let in url benchmarksAlex Ramirez
In benchmark url directory this changes for loops using var to let when it applies for consistency PR-URL: https://github.com/nodejs/node/pull/28867 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-03-27benchmark,doc,lib: capitalize more commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-11-20benchmark: pre-generate data set for URL benchmarksJoyee Cheung
This patch: - Introduces `common.bakeUrlData` which can be used to pre-generate the data set for the URL benchmarks to loop through instead of looping over a constant. - Add the option to use WPT data in benchmarks for better diversity in the input - Add the option to benchmark URL parsing with base URLs (whatwg only) - Moves the data in `benchmark/fixtures/url-inputs.js` to `benchmark/common.js` PR-URL: https://github.com/nodejs/node/pull/24302 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-11benchmark: fix benchmark for urlSergey Golovin
Rename different parameters with the same names to make it possible to run tests for url benchmarks. PR-URL: https://github.com/nodejs/node/pull/19084 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-23url: reduce deplicated codes in `autoEscapeStr`Weijia Wang
PR-URL: https://github.com/nodejs/node/pull/18613 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01benchmark: (url) refactorRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/18320 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-23benchmark: (url) use destructuringRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/18250 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-19benchmark: var to constRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/13757 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-21lib,src: fix consistent spacing inside bracesSebastiaan Deckers
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-23benchmark,lib,test: use braces for multiline blockRich Trott
For if/else and loops where the bodies span more than one line, use curly braces. PR-URL: https://github.com/nodejs/node/pull/13828 Ref: https://github.com/nodejs/node/pull/13623#discussion_r123048602 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-20benchmark: reduce string concatenationsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/12455 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-04url: avoid instanceof for WHATWG URLBrian White
PR-URL: https://github.com/nodejs/node/pull/11690 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-21url: spec-compliant URLSearchParams parserTimothy Gu
The entire `URLSearchParams` class is now fully spec-compliant. PR-URL: https://github.com/nodejs/node/pull/11858 Fixes: https://github.com/nodejs/node/issues/10821 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-21benchmark: remove v8ForceOptimization callsLucas Lago
This removes common.v8ForceOptimization calls from url and vm benchmark files. PR-URL: https://github.com/nodejs/node/pull/11908 Fixes: https://github.com/nodejs/node/issues/11895 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-14url: spec-compliant URLSearchParams serializerTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/11626 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-06benchmark: remove forced optimization from urlBartosz Sosnowski
This removes all instances of %OptimizeFunctionOnNextCall from url benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-02-28benchmark: add USVString conversion benchmarkTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/11436 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-24benchmark: add url.domainTo*()Timothy Gu
PR-URL: https://github.com/nodejs/node/pull/11464 Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-15benchmark: clean up legacy url benchmarksJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-02-15benchmark: refactor whatwg-url-propertiesJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-02-15benchmark: move url data to fixturesJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-02-13benchmark: add url/url-searchparams-sort.jsTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/11098 Fixes: https://github.com/nodejs/node/issues/10760 Ref: https://github.com/whatwg/url/issues/26 Ref: https://github.com/whatwg/url/pull/199 Ref: https://github.com/w3c/web-platform-tests/pull/4531 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-02-09benchmark: URLSearchParams v.s. querystringJoyee Cheung
Add benchmarks to compare the performance between URLSearchParams and querystring, remove duplicate benchmarks. PR-URL: https://github.com/nodejs/node/pull/11170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-02-09benchmark: fix first call to URL in useWHATWGJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/11170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-02-03benchmark: simplify URLSearchParams importTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/11111 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
2017-01-19url: improving URLSearchParamsTimothy Gu
- add some benchmarks for URLSearchParams - change URLSearchParams backing store to an array - add custom inspection for URLSearchParams and its iterators PR-URL: https://github.com/nodejs/node/pull/10399 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-15benchmark: improve WHATWG URL benchmarksJoyee Cheung
* add benchmark to compare the performance of getting url properties between the WHATWG URL and the legacy implementation * add benchmark to compare the performance of serializing urls between the WHATWG URL and the legacy implementation * refactor the benchmark for comparing parsing performance between the two implementations PR-URL: https://github.com/nodejs/node/pull/10678 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-01-06benchmark,lib,test: adjust for lintingRich Trott
Formatting changes for upcoming linter update. PR-URL: https://github.com/nodejs/node/pull/10561 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2016-12-29benchmark: add benchmark for WHATWG URL propertiesJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/10408 Fixes: https://github.com/nodejs/node/issues/10376 Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-11url: adding WHATWG URL supportJames M Snell
Implements WHATWG URL support. Example: ``` var u = new url.URL('http://example.org'); ``` Currently passing all WHATWG url parsing tests and all but two of the setter tests. The two setter tests are intentionally skipped for now but will be revisited. PR-URL: https://github.com/nodejs/node/pull/7448 Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
2016-06-13benchmark: add benchmark for url.format()Rich Trott
PR-URL: https://github.com/nodejs/node/pull/7250 Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-26benchmark: merge url.js with url-resolve.jsAndreas Madsen
url.js was broken since it didn't use the common.js runner. This fixes that issue by merging it with url-resolve.js, which also benchmarks url.resolve. PR-URL: https://github.com/nodejs/node/pull/5177 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2016-02-26benchmark: move misc to categorized directoriesAndreas Madsen
PR-URL: https://github.com/nodejs/node/pull/5177 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2016-02-22benchmark: use strict modeRich Trott
Apply strict mode to benchmark code. PR-URL: https://github.com/nodejs/node/pull/5336 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-20lib: micro-optimize url.resolve()Ben Noordhuis
Replace the call to Array#splice() with a faster open-coded version that creates less garbage. Add a new benchmark to prove it. With the change applied, it scores about 5% higher and that is nothing to sneeze at. PR-URL: https://github.com/iojs/io.js/pull/184 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-20benchmark: rename url.parse() benchmarkBen Noordhuis
Rename the url.parse() benchmark from url.js to url-parse.js. A follow-up commit is going to add another one for url.resolve(). PR-URL: https://github.com/iojs/io.js/pull/184 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-19benchmark: pre-optimize url.parse() before startBen Noordhuis
Force V8 to optimize url.parse() before starting the actual benchmark. Tries to minimize variance between successive runs caused by the optimizer kicking in at different points. It does not seem to have much impact, CPU times are roughly the same before and afterwards; url.parse() quickly plateaus at a local optimum where most time is spent in V8 builtins, notably Runtime_StringSplit() and Object::GetElementWithReceiver() calls originating from deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that I could spot. Still, I don't see any downsides to pre-optimizing the function being benchmarked so in it goes. PR-URL: https://github.com/iojs/io.js/pull/132 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-12-09benchmark: add url benchmarksBen Noordhuis
Based on the ad-hoc benchmark from joyent/node#8638 plus an additional benchmark for user:pass auth URLs. PR-URL: https://github.com/iojs/io.js/pull/102 Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>