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

lib: micro-optimize EventEmitter#removeListener() #185

Merged
merged 2 commits into from
Dec 20, 2014

Commits on Dec 20, 2014

  1. benchmark: fix printing of large numbers

    Don't use Number#toPrecision(), it switches to scientific notation for
    numbers with more digits than the precision; use Number#toFixed().
    
    PR-URL: nodejs#185
    Reviewed-By: Chris Dickinson <[email protected]>
    bnoordhuis committed Dec 20, 2014
    Configuration menu
    Copy the full SHA
    d0c238c View commit details
    Browse the repository at this point in the history
  2. lib: micro-optimize EventEmitter#removeListener()

    Replace the call to Array#splice() with a faster open-coded version
    that creates less garbage.
    
    Add a new benchmark to prove it.  With the change applied, it scores
    a whopping 40% higher.
    
    PR-URL: nodejs#185
    Reviewed-By: Chris Dickinson <[email protected]>
    bnoordhuis committed Dec 20, 2014
    Configuration menu
    Copy the full SHA
    d3f8db1 View commit details
    Browse the repository at this point in the history