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

buffer: improve fill & normalizeEncoding performance #18790

Closed
wants to merge 5 commits into from

Commits on Feb 22, 2018

  1. buffer: improve Buffer#fill performance

    1) This improves the performance for Buffer#fill by using shortcuts.
    2) It also ports throwing errors to JS. That way they contain the
    proper error code.
    3) Using negative `end` values will from now on result in an error
    instead of just doing nothing.
    4) Passing in `null` as encoding is from now on accepted as 'utf8'.
    BridgeAR committed Feb 22, 2018
    Configuration menu
    Copy the full SHA
    440da3d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b416c2 View commit details
    Browse the repository at this point in the history
  3. benchmark: rename file

    BridgeAR committed Feb 22, 2018
    Configuration menu
    Copy the full SHA
    acab8bd View commit details
    Browse the repository at this point in the history
  4. lib: improve normalize encoding performance

    This focuses on the common case by making sure they are prioritized.
    It also changes some typeof checks to test for undefined since
    that is faster and it adds a benchmark.
    BridgeAR committed Feb 22, 2018
    Configuration menu
    Copy the full SHA
    f8249bb View commit details
    Browse the repository at this point in the history
  5. buffer: stricter isEncoding

    Due to a consolidation the isEncoding function got less strict in
    version 5.x.x. This commit makes sure we do not return `true` for
    empty strings.
    BridgeAR committed Feb 22, 2018
    Configuration menu
    Copy the full SHA
    c5aa244 View commit details
    Browse the repository at this point in the history