0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

427 Commits

Author SHA1 Message Date
Vse Mozhet Byt
ab2d49bcac benchmark: fix fs\bench-realpathSync.js
Make it call-site-cwd-independent.

PR-URL: https://github.com/nodejs/node/pull/11904
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-21 14:04:03 +02:00
Lucas Lago
3129ba2bae benchmark: remove v8ForceOptimization calls
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-21 10:11:36 +01:00
James M Snell
c8acd08a37 benchmark: benchmark comparing forEach with for
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:03 -07:00
Brian White
6a5ab5d550 fs: include more fs.stat*() optimizations
Including:

* Move async *stat() functions to FillStatsArray() now used by the
sync *stat() functions

* Avoid creating fs.Stats instances for implicit async/sync *stat()
calls used in various fs functions

* Store reference to Float64Array data on C++ side for easier/faster
access, instead of passing from JS to C++ on every async/sync *stat()
call

PR-URL: https://github.com/nodejs/node/pull/11665
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 21:54:40 -07:00
Timothy Gu
d77a7588cf url: spec-compliant URLSearchParams serializer
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-14 13:14:20 -07:00
Brian White
190dc69c89
benchmark: add parameter for module benchmark
PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:46:36 -05:00
James M Snell
98e54b0bd4 meta: restore original copyright header
A prior io.js era commit inappropriately removed the
original copyright statements from the source. This
restores those in any files still remaining from that
edit.

Ref: https://github.com/nodejs/TSC/issues/174
Ref: https://github.com/nodejs/node/pull/10599
PR-URL: https://github.com/nodejs/node/pull/10155

Note: This PR was required, reviewed-by and approved
by the Node.js Foundation Legal Committee and the TSC.
There is no `Approved-By:` meta data.
2017-03-10 11:23:48 -08:00
Bartosz Sosnowski
6df23fa39f benchmark: fix punycode and get-ciphers benchmark
Add missing 'i=0' from for-loops from punycode and get-ciphers
benchmarks.

PR-URL: https://github.com/nodejs/node/pull/11720
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-09 22:01:45 +01:00
Bartosz Sosnowski
75cdc895ec benchmark: cleanup after forced optimization drop
This removes all instances of %OptimizeFunctionOnNextCall from common.js
and README.md

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-03-06 16:32:06 +01:00
Bartosz Sosnowski
ca86aa5323 benchmark: remove forced optimization from util
This removes all instances of %OptimizeFunctionOnNextCall from util
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-03-06 16:32:05 +01:00
Bartosz Sosnowski
c5958d20fd benchmark: remove forced optimization from url
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-03-06 16:32:04 +01:00
Bartosz Sosnowski
ea61ce518b benchmark: remove forced optimization from tls
This removes all instances of %OptimizeFunctionOnNextCall from tls
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-03-06 16:32:03 +01:00
Bartosz Sosnowski
541119c6ee benchmark: remove streams forced optimization
This removes all instances of %OptimizeFunctionOnNextCall from streams
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-03-06 16:32:02 +01:00
Bartosz Sosnowski
57b5ce1d8e benchmark: remove querystring forced optimization
This removes all instances of %OptimizeFunctionOnNextCall from
querystring 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-03-06 16:32:01 +01:00
Bartosz Sosnowski
eba2c62bb1 benchmark: remove forced optimization from path
This removes all instances of %OptimizeFunctionOnNextCall from path
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-03-06 16:32:00 +01:00
Bartosz Sosnowski
7587a11adc benchmark: remove forced optimization from misc
This removes all instances of %OptimizeFunctionOnNextCall from misc
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-03-06 16:31:59 +01:00
Bartosz Sosnowski
ef8cc301fe benchmark: remove forced optimization from es
This removes all instances of %OptimizeFunctionOnNextCall from es
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-03-06 16:31:58 +01:00
Bartosz Sosnowski
17c85ffd80 benchmark: remove forced optimization from crypto
This removes all instances of %OptimizeFunctionOnNextCall from crypto
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-03-06 16:31:57 +01:00
Bartosz Sosnowski
05ac6e1b01 benchmark: remove forced optimization from buffer
This removes all instances of %OptimizeFunctionOnNextCall from buffer
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-03-06 16:31:56 +01:00
Benjamin Fleischer
4897ae2114
benchmark,build,doc,lib,src,test: correct typos
PR-URL: https://github.com/nodejs/node/pull/11189
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-03-03 16:29:19 -05:00
Brian White
4e05952a8a
os: improve cpus() performance
PR-URL: https://github.com/nodejs/node/pull/11564
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
2017-03-02 15:31:21 -05:00
Vse Mozhet Byt
dd81d539e2 child_process: fix deoptimizing use of arguments
Removed or fixed use of arguments in execFile(),
normalizeExecArgs(), and normalizeSpawnArguments().

Refs: https://github.com/nodejs/node/issues/10323
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=6010
PR-URL: https://github.com/nodejs/node/pull/11535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-01 10:24:03 -05:00
Timothy Gu
6123ed5b25 benchmark: add USVString conversion benchmark
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-28 18:39:24 -08:00
Brian White
22abb39b2c
fs: improve performance for sync stat() functions
PR-URL: https://github.com/nodejs/node/pull/11522
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-02-25 20:58:42 -05:00
Brian White
efdc571a58
os: improve loadavg() performance
PR-URL: https://github.com/nodejs/node/pull/11516
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-02-25 20:53:56 -05:00
Timothy Gu
d4e1eaf43c benchmark: add url.domainTo*()
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-24 17:49:46 -08:00
Brian White
f385f77f1d process: improve memoryUsage() performance
Creating an object in JS and using a typed array to transfer values
from C++ to JS is faster than creating an object and setting
properties in C++.

The included benchmark shows ~34% increase in performance with this
change.

PR-URL: https://github.com/nodejs/node/pull/11497
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-02-23 17:19:39 -08:00
Anna Henningsen
049709b07d
benchmark: strip BOM in dgram/bind-params
PR-URL: https://github.com/nodejs/node/pull/11479
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-02-24 01:54:45 +01:00
Vse Mozhet Byt
1162e284ca
benchmark: add dgram bind(+/- params) benchmark
Refs: https://github.com/nodejs/node/pull/11242
PR-URL: https://github.com/nodejs/node/pull/11313
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-02-21 18:27:11 +01:00
Michaël Zasso
193468667b tools: enable one-var-declaration-per-line ESLint rule
This rule enforces new lines around variable declarations. It is
configured to spot only variables that are initialized.

PR-URL: https://github.com/nodejs/node/pull/11462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-02-21 12:53:19 +01:00
Joyee Cheung
8926f1110d doc: add benchmark/README.md and fix guide
* Write a new benchmark/README.md describing the benchmark
  directory layout and common API.
* Fix the moved benchmarking guide accordingly, add tips about how
  to get the help text from the benchmarking tools.

PR-URL: https://github.com/nodejs/node/pull/11237
Fixes: https://github.com/nodejs/node/issues/11190
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2017-02-17 23:50:41 +08:00
Joyee Cheung
4bed6d6e93 doc: move benchmark/README.md to doc/guides
Since benchmark/README.md is in fact a guide on how to
write and run benchmarks, move it to doc/guides.

PR-URL: https://github.com/nodejs/node/pull/11237
Fixes: https://github.com/nodejs/node/issues/11190
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2017-02-17 23:49:34 +08:00
Brian White
a08fcc02f8 benchmark: fix timer display in progress output
This commit fixes an issue where the minutes would not display
properly on the benchmark timer once an hour had elapsed.

PR-URL: https://github.com/nodejs/node/pull/11235
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-16 16:22:56 -08:00
Joyee Cheung
7ee95045dd benchmark: clean up legacy url benchmarks
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-15 09:12:30 -08:00
Joyee Cheung
d8ac08a62a benchmark: refactor whatwg-url-properties
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-15 09:12:25 -08:00
Joyee Cheung
e571fd4f6c benchmark: move url data to fixtures
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-15 09:12:16 -08:00
Timothy Gu
781eb90960 benchmark: add url/url-searchparams-sort.js
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-13 20:49:13 -08:00
Brian White
ff785fd517 querystring: fix empty pairs and optimize parse()
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-13 10:40:37 -08:00
Nikolai Vavilov
f5ee9921e6 benchmark: fix typos
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-10 22:21:35 +02:00
James M Snell
595df9fc4b benchmarks: add spread operator benchmark
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-09 17:58:41 -08:00
Joyee Cheung
ab3e0862af benchmark: URLSearchParams v.s. querystring
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-09 22:57:53 +08:00
Joyee Cheung
c6b586de33 benchmark: fix first call to URL in useWHATWG
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-09 22:57:15 +08:00
Joyee Cheung
5e4545e18f benchmark: add assert.deep[Strict]Equal benchmarks
* 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-06 11:25:21 +08:00
Timothy Gu
590626ba11 benchmark: simplify URLSearchParams import
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-02-03 12:23:30 -08:00
Joyee Cheung
60d77bd514 benchmark: add progress indicator to compare.js
* 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-31 03:03:57 +08:00
Joshua Colvin
1f342afab7 benchmark: move setImmediate benchmarks to timers
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-30 08:44:09 -08:00
Jeremiah Senkpiel
c74e6fe651 benchmark: add more thorough timers benchmarks
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-27 14:26:24 -05:00
Michaël Zasso
ad6e778c4a benchmark: add benchmark for object properties
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-27 13:00:42 +01:00
Brian White
3bdcbdb1a0
querystring: improve unescapeBuffer performance
PR-URL: https://github.com/nodejs/node/pull/10837
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-25 02:22:26 -05:00
Brian White
2298bc4b1f
querystring: improve parse() performance
PR-URL: https://github.com/nodejs/node/pull/10874
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-25 02:05:26 -05:00