summaryrefslogtreecommitdiff
path: root/benchmark
AgeCommit message (Collapse)Author
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-13querystring: fix empty pairs and optimize parse()Brian White
This commit fixes handling of empty pairs that occur before the end of the query string so that they are also ignored. Additionally, some optimizations have been made, including: * Avoid unnecessary code execution where possible * Use a lookup table when checking for hex characters * Avoid forced decoding when '+' characters are encountered and we are using the default decoder Fixes: https://github.com/nodejs/node/issues/10454 PR-URL: https://github.com/nodejs/node/pull/11234 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
2017-02-10benchmark: fix typosNikolai Vavilov
PR-URL: https://github.com/nodejs/node/pull/11287 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-02-09benchmarks: add spread operator benchmarkJames M Snell
Useful for comparing spread operator performance over time. PR-URL: https://github.com/nodejs/node/pull/11227 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
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-06benchmark: add assert.deep[Strict]Equal benchmarksJoyee Cheung
* Move numbers into configuration * Add buffer comparison benchmark * Add assert.deepStrictEqual benchmarks PR-URL: https://github.com/nodejs/node/pull/11092 Reviewed-By: James M Snell <jasnell@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-31benchmark: add progress indicator to compare.jsJoyee Cheung
* Print the progress bar and the current benchmark to stderr when stderr is TTY and stdout is not. * Allow cli arguments without values via setting.boolArgs * Add --no-progress option PR-URL: https://github.com/nodejs/node/pull/10823 Fixes: https://github.com/nodejs/node/issues/8659 Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2017-01-30benchmark: move setImmediate benchmarks to timersJoshua Colvin
PR-URL: https://github.com/nodejs/node/pull/11010 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-27benchmark: add more thorough timers benchmarksJeremiah Senkpiel
Refs: https://github.com/nodejs/node/issues/9493 PR-URL: https://github.com/nodejs/node/pull/10925 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-01-27benchmark: add benchmark for object propertiesMichaël Zasso
Adds a benchmark to compare the speed of property setting/getting in four cases: - Dot notation: `obj.prop = value` - Bracket notation with string: `obj['prop'] = value` - Bracket notation with string variable: `obj[prop] = value` - Bracket notation with Symbol variable: `obj[sym] = value` PR-URL: https://github.com/nodejs/node/pull/10949 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-01-25querystring: improve unescapeBuffer performanceBrian White
PR-URL: https://github.com/nodejs/node/pull/10837 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-25querystring: improve parse() performanceBrian White
PR-URL: https://github.com/nodejs/node/pull/10874 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-25buffer: improve compare() performanceBrian White
PR-URL: https://github.com/nodejs/node/pull/10927 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-23process: improve process.hrtimeJoyee Cheung
* Add benchmarks for diffing a previous result * Improvements to the documentation, including type annotation * Update the outdated comments in src/node.cc, improve comments in lib/internal/process.js * Check the argument is an Array Tuple with length 2 PR-URL: https://github.com/nodejs/node/pull/10764 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-01-23buffer: improve toJSON() performanceBrian White
PR-URL: https://github.com/nodejs/node/pull/10895 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michal Zasso <targos@protonmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.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-18benchmark: add benchmark for vm.runIn*()Rich Trott
Introduce benchmarks for vm.runInContext() and vm.runInThisContext(). PR-URL: https://github.com/nodejs/node/pull/10816 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-01-16benchmark: cleanup child_process IPC benchmarkYuya Tanaka
Squashed from: - child_process: fix IPC bench to obey send() ret val - child_process: fix IPC benchmark message has two more bytes - child_process: use setImmediate for IPC bench PR-URL: https://github.com/nodejs/node/pull/10557 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-01-15util: improve readability of normalizeEncodingJoyee Cheung
* Improve readability of util.normalizeEncoding and add some comments * Add a benchmark for util.normalizeEncoding PR-URL: https://github.com/nodejs/node/pull/10439 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@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-14benchmark: use "confidence" in output of compare.RJoyee Cheung
Use the word "confidence" to indicate the confidence level of the p value so it's easier to understand. With this change more stars in the output of compare.R means higher confidence level (lower significance level). PR-URL: https://github.com/nodejs/node/pull/10737 Refs: https://github.com/nodejs/node/pull/10439 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2017-01-13benchmark: add ClientRequest creation benchmarkBrian White
PR-URL: https://github.com/nodejs/node/pull/10654 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2017-01-11benchmark: allow zero when parsing http req/sBrian White
Without this, the http benchmarker would report "strange output" if wrk or any other http client reported 0 requests per second, which is a valid result. PR-URL: https://github.com/nodejs/node/pull/10558 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-01-11benchmark: add http header setting scenariosBrian White
PR-URL: https://github.com/nodejs/node/pull/10558 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
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>
2017-01-05benchmark: fix typo "categoty" -> "category"Victor Felder
PR-URL: https://github.com/nodejs/node/pull/10568 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-01-05stream: avoid additional validation for BuffersBrian White
These changes result in ~50% improvement in the included benchmark. PR-URL: https://github.com/nodejs/node/pull/10580 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-05benchmark: keep decimals in resultsBrian White
Some benchmarks' results are small values, so keeping decimals when running them manually (not comparing) can be helpful. PR-URL: https://github.com/nodejs/node/pull/10559 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-05benchmark: improve readability of net benchmarksBrian White
PR-URL: https://github.com/nodejs/node/pull/10446 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-05benchmark: move punycode benchmark out of netBrian White
punycode/ICU is not specific to any particular module, so move it to a more generic location. PR-URL: https://github.com/nodejs/node/pull/10446 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-04benchmark: allow benchmarks to specify flagsJoyee Cheung
* Give createBenchmark and the Benchmark constructor a third argument for specifying the command line flags that this benchmark should be run with. The benchmarks are no longer run with --expose-internals by default, they will need to explicitly pass the flags. * Rename options to configs in createBenchmark and the Benchmark constructor to match the documentation since they are not optional. * Comment the properties of a Benchmark object Also improve the documentation about creating benchmarks * Add detailed description of the arguments of `createBenchmark` * Describe the two passes of running the benchmarks * Suggest what kind of code should go where in the benchmark example PR-URL: https://github.com/nodejs/node/pull/10448 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
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-12-28events: improve once() performanceBrian White
This commit takes advantage of the performance improvements V8 has made to function.bind() in V8 5.4 and uses it to avoid constant recompilation/reoptimization of the wrapper closure used in once(). This change results in ~27% performance increase for once(). PR-URL: https://github.com/nodejs/node/pull/10445 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-27buffer: improve allocation performanceBrian White
assertSize() is adjusted to be inlineable according to V8's default function size limits when determining inlineability. This results in up to 11% performance gains when allocating any kind of Buffer. Avoid avoids use of in, resulting in ~50% improvement when creating a Buffer from an array-like object. PR-URL: https://github.com/nodejs/node/pull/10443 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-12-23benchmark: use commas in non-csv rate outputBrian White
PR-URL: https://github.com/nodejs/node/pull/10360 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-23benchmark: refactor buffer benchmarksTroy Connor
Add configuration object createBenchmark object for buffer size & iteration in buffer-base64-encode & buffer-base64-decode.js. PR-URL: https://github.com/nodejs/node/pull/10175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2016-12-22tools: enforce linebreak after ternary operatorsMichaël Zasso
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: https://github.com/nodejs/node/pull/10213 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-15doc: document R CRAN mirror processLucas Holmquist
The current benchmark docs showing how to install R packages doesn't go into how to specify a CRAN mirror. This commit shows how to specify the repo parameter when installing a package. Fixes: https://github.com/nodejs/node/issues/10204 PR-URL: https://github.com/nodejs/node/pull/10211 Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2016-11-27benchmark: reformat code for clarityRich Trott
Some of the benchmark code can be a little dense. Not *very* hard to read but perhaps harder than it needs to be. These changes (many of them whitespace-only) hopefully improve readability. There are also a few cases of `assert.equal()` that are changed to `assert.strictEqual()`. PR-URL: https://github.com/nodejs/node/pull/9790 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-21tools: disallow trailing whitespace for markdownSam Roberts
markdown had a dispensation because 2 or more trailing spaces triggers a new paragraph. There are no examples of that usage in Node, all trailing whitespace found were mistakes, and the dispensation is now removed. See: https://github.com/nodejs/node/pull/9620 PR-URL: https://github.com/nodejs/node/pull/9676 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-09benchmark: split timers benchmark and refactorRich Trott
The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them. Since each timer has to wait for the next tick of the event loop this benchmark takes a very long time to run compared to the breadth test that is already in the file. This may be more of an event loop benchmark than a timer benchmark. Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer. Split the depth and breadth benchmarks so that their `N` values can be set independently. Do some minor refactoring to the benchmarks (but no ES6 additions so that the benchmarks can still be run with old versions of Node.js). Refs: https://github.com/nodejs/node/issues/9493 PR-URL: https://github.com/nodejs/node/pull/9497 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-11-06benchmark,lib,test,tools: remove unneeded . escapeRich Trott
The `.` character does not need to be escaped when it appears inside a regular expression character class. This removes instances of unnecessary escapes of the `.` character. This also removes a few unnecessary escapes of the `(` and `)` characters within character classes too. PR-URL: https://github.com/nodejs/node/pull/9449 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com>
2016-11-04benchmark: add trailing newline for consistencyRoman Reiss
PR-URL: https://github.com/nodejs/node/pull/9410 Fixes: https://github.com/nodejs/node/issues/9402 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-10-29benchmark: add microbenchmarks for ES MapRod Vagg
PR-URL: https://github.com/nodejs/node/pull/7581 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <ranziska.hinkelmann@gmail.com>
2016-10-19test,lib,benchmark: match function namesRich Trott
In most cases, named functions match the variable or property to which they are being assigned. That also seems to be the practice in a series of PRs currently being evaluated that name currently-anonymous functions. This change applies that rule to instances in the code base that don't comply with that practice. This will be enforceable with a lint rule once we upgrade to ESLint 3.8.0. PR-URL: https://github.com/nodejs/node/pull/9113 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>