crypto,tls: perf improvements for crypto and tls getCiphers#7225
crypto,tls: perf improvements for crypto and tls getCiphers#7225jasnell wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Is this really worth optimizing? |
|
It's not a high priority by any means but a perf boost is a perf boost ;-) |
lib/tls.js
Outdated
There was a problem hiding this comment.
Any point in prefixing module-local variable?
|
@indutny ... updated! |
|
LGTM, if CI is green. |
|
Thank you. |
lib/tls.js
Outdated
There was a problem hiding this comment.
minor nit: true would look better than 1 for a boolean argument
|
LGTM except for one minor nit and if CI is ok with it: https://un5nebugbq7m6fnmhkae4.julianrbryant.com/job/node-test-pull-request/2986/ |
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%
742da68 to
7495c26
Compare
|
Nit addressed, commits squashed, new CI: https://un5nebugbq7m6fnmhkae4.julianrbryant.com/job/node-test-pull-request/3039/ |
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: #7225 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
|
Landed in 6be73fe |
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: #7225 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
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: #7225 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Conflicts: lib/internal/util.js
|
@jasnell lts? |
|
this is not landing cleanly so I am going to mark as don't land. Please feel free to backport |
|
/cc @jasnell |
|
Not backporting this should be fine. |
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
crypto, tls
Description of change
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%
@nodejs/crypto @mscdex