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

util: improve util.format performance #5360

Merged
merged 3 commits into from
Mar 4, 2016

Commits on Mar 4, 2016

  1. benchmark: add util.format benchmark

    PR-URL: nodejs#5360
    Reviewed-By: James M Snell <jasnell@gmail.com>
    evanlucas committed Mar 4, 2016
    Configuration menu
    Copy the full SHA
    735e0df View commit details
    Browse the repository at this point in the history
  2. util: improve util.format performance

    By manually copying arguments and breaking the try/catch out, we are
    able to improve the performance of util.format by 20-100% (depending on
    the types).
    
    PR-URL: nodejs#5360
    Reviewed-By: James M Snell <jasnell@gmail.com>
    evanlucas committed Mar 4, 2016
    Configuration menu
    Copy the full SHA
    8d72b0d View commit details
    Browse the repository at this point in the history
  3. util: improve format() performance further

    Replacing the regexp and replace function with a loop improves
    performance by ~60-200%.
    
    PR-URL: nodejs#5360
    Reviewed-By: James M Snell <jasnell@gmail.com>
    mscdex authored and evanlucas committed Mar 4, 2016
    Configuration menu
    Copy the full SHA
    c490b8b View commit details
    Browse the repository at this point in the history