0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Vse Mozhet Byt
74dc3bfe08 benchmark: replace [].join() with ''.repeat()
Also add a benchmark to compare both ways to create strings.

PR-URL: https://github.com/nodejs/node/pull/12170
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-04 09:19:18 -07: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
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
Rich Trott
ae25ed3ccd benchmark: favor === over ==
Refs: https://github.com/nodejs/node/pull/7961#discussion_r73788501
PR-URL: https://github.com/nodejs/node/pull/8000
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-08-09 14:40:01 -07:00
James M Snell
6be73feaeb crypto,tls: perf improvements for crypto and tls getCiphers
Improve performance of crypto.getCiphers, getHashes, getCurves
and tls.getCiphers by consolidating filterDuplicates logic, adding
caching of output, and streamlining filterDuplicates implementation.

Benchmarks:

crypto.getCiphers n=1    v6.2.1 = 2559.3, new = 15890 ...... -83.89%
crypto.getCiphers n=5000 v6.2.1 = 3516.3, new = 24203000 ... -99.99%

tls.getCiphers    n=1    v6.2.1 = 3405.3, new = 14877 ...... -77.11%
tls.getCiphers    n=5000 v6.2.1 = 6074.4, new = 24202000 ... -99.97%

PR-URL: https://github.com/nodejs/node/pull/7225
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-06-21 10:03:08 -07:00
James M Snell
85ab4a5f12 buffer: add .from(), .alloc() and .allocUnsafe()
Several changes:

* Soft-Deprecate Buffer() constructors
* Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()`
* Add `--zero-fill-buffers` command line option
* Add byteOffset and length to `new Buffer(arrayBuffer)` constructor
* buffer.fill('') previously had no effect, now zero-fills
* Update the docs

PR-URL: https://github.com/nodejs/node/pull/4682
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-03-16 08:34:02 -07:00
Rich Trott
76e4a74377 benchmark: refactor to eliminate redeclared vars
In order to comply with linting rules used in the rest of the code base,
eliminate redeclared variables. A conservative approach is used so as to
avoid unintentional performance issues (for example, as might be seen in
some situations when using `let` instead of `var`).

PR-URL: https://github.com/nodejs/node/pull/5468
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-03-01 13:48:42 -08:00
Rich Trott
dcfda1007b tools,benchmark: increase lint compliance
In the hopes of soon having the benchmark code linted, this change
groups all the likely non-controversial lint-compliance changes such as
indentation, semi-colon usage, and single-vs.-double quotation marks.

Other lint rules may have subtle performance implications in the V8
currently shipped with Node.js. Those changes will require more careful
review and will be in a separate change.

PR-URL: https://github.com/nodejs/node/pull/5429
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-27 20:15:17 -08:00
Rich Trott
4bb529d972 benchmark: use strict mode
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>
2016-02-22 11:09:26 -08:00
Shigeki Ohtsu
3a69b7689b benchmark: add rsa/aes-gcm performance test
PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-04 12:37:26 +09:00
Shigeki Ohtsu
1c709f3aa9 benchmark: add/remove hash algorithm
add sha1, sha512 algorithm and remove md5

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-04 12:37:26 +09:00
isaacs
201baa273b benchmark: hash stream 2013-05-14 11:36:04 -07:00
isaacs
bd4d585b7a bench: Add bench-crypto 2013-02-19 17:16:55 -08:00