Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: avoid calling Buffer.byteLength multiple times #7236

Closed
wants to merge 1 commit into from

Commits on Jun 21, 2016

  1. tls: avoid calling Buffer.byteLength multiple times

    There's no reason to be calling Buffer.byteLength() twice.
    Small perf improvement
    
    Run 1:
    tls/convertprotocols.js n=1     v6.2.1 = 11852,  new = 12204 ......  -2.89%
    tls/convertprotocols.js n=50000 v6.2.1 = 515660, new = 570610 .....  -9.63%
    
    Run 2:
    tls/convertprotocols.js n=1     v6.2.1 = 11729,  new = 12045 ......  -2.62%
    tls/convertprotocols.js n=50000 v6.2.1 = 512080, new = 637730 ..... -19.70%
    jasnell committed Jun 21, 2016
    Configuration menu
    Copy the full SHA
    e9aaabb View commit details
    Browse the repository at this point in the history