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

streams: Ensure that instanceof fast-path is hit. #13403

Closed
wants to merge 1 commit into from

Commits on Jun 2, 2017

  1. streams: Ensure that instanceof fast-path is hit.

    With the new Ignition+TurboFan pipeline, the instanceof fast-path can be
    missed if the right-hand side needs a TDZ check, i.e. is const declared
    on a surrounding scope. This doesn't apply to Node 8 at this point,
    where it's at V8 5.8, but it applies as soon as V8 5.9 rolls. There's
    work going on in Ignition (and TurboFan) to optimize those TDZ checks
    properly, but those changes will land in V8 6.1, so might not end up in
    Node 8.
    
    One way to work-around this in Node core for now is to use var instead
    of const for those right-hand sides for instanceof for now, especially
    Buffer in case of streams. This is not beautiful, but proper ducktape.
    Improves readable-bigread.js by ~23% with Node LKGR.
    bmeurer committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    6f03b56 View commit details
    Browse the repository at this point in the history