Skip to content

crypto,tls: perf improvements for crypto and tls getCiphers#7225

Closed
jasnell wants to merge 1 commit intonodejs:masterfrom
jasnell:perf-get-ciphers
Closed

crypto,tls: perf improvements for crypto and tls getCiphers#7225
jasnell wants to merge 1 commit intonodejs:masterfrom
jasnell:perf-get-ciphers

Conversation

@jasnell
Copy link
Member

@jasnell jasnell commented Jun 8, 2016

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected 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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto Issues and PRs related to the crypto subsystem. performance Issues and PRs related to the performance of Node.js. tls Issues and PRs related to the tls subsystem. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants