Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Conversation

@mmalecki
Copy link

@mmalecki mmalecki commented Jul 6, 2012

When profiling my application I noticed that V8 bails out on fs.read
function, due to access to arguments array when named paramaters are
given.

When profiling my application I noticed that V8 bails out on `fs.read`
function, due to access to `arguments` array when named paramaters are
given.
@bnoordhuis
Copy link
Member

What performance difference are we talking here?

@Rush
Copy link

Rush commented Jul 6, 2012

Isn't it a problem in V8 itself? Accessing arguments by index should be the same performance-wise, shouldn't it?

@bnoordhuis
Copy link
Member

Accessing arguments by index should be the same performance-wise, shouldn't it?

Ideally, yes. In practice, no.

V8 tends to deoptimize (or not optimize at all) functions that use the arguments object. Run your script with --trace-deopt to see the effect in action.

@mmalecki
Copy link
Author

mmalecki commented Jul 9, 2012

It's hard to tell what's the performance impact. I just assumed that the less bailouts and deopts we have, the better it is.

@bnoordhuis
Copy link
Member

Only if it makes a substantial difference. In this case, we're talking about a deopt in the code path of a deprecated feature of a function that's dominated by I/O anyway. Thanks but I won't take the patch.

@bnoordhuis bnoordhuis closed this Jul 9, 2012
richardlau pushed a commit to ibmruntimes/node that referenced this pull request Dec 15, 2015
Fix node exiting due to an exception being thrown rather than emitting
an `'uncaughtException'` event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an `'uncaughtException'` event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and `--abort-on-uncaught-exception` is used.

Finally, change the behavior of --abort-on-uncaught-exception so that,
if the domain within which the error is thrown has no error handler, but
a domain further up the domains stack has one, the process will not
abort.

Fixes nodejs#3607 and nodejs#3653.

PR: nodejs#3654
PR-URL: nodejs/node#3654
Reviewed-By: Chris Dickinson <chris@neversaw.us>
smanders pushed a commit to externpro-archive/node-v0.x-archive that referenced this pull request Dec 17, 2015
Notable changes:

* buffer:
  - Buffer.prototype.includes() has been added to keep parity
    with TypedArrays. (Alexander Martin) nodejs#3567.
* domains:
  - Fix handling of uncaught exceptions.
    (Julien Gilli) nodejs#3654.
* https:
  - Added support for disabling session caching.
    (Fedor Indutny) nodejs#4252.
* repl:
  - Allow third party modules to be imported using
    require(). This corrects a regression from 5.2.0.
    (Ben Noordhuis) nodejs#4215.
* deps:
  - Upgrade libuv to 1.8.0.
    (Saúl Ibarra Corretgé) nodejs#4276.

PR-URL: nodejs/node#4281

Conflicts:
	src/node_version.h
richardlau pushed a commit to ibmruntimes/node that referenced this pull request Jan 13, 2016
Fix node exiting due to an exception being thrown rather than emitting
an `'uncaughtException'` event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an `'uncaughtException'` event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and `--abort-on-uncaught-exception` is used.

Finally, change the behavior of --abort-on-uncaught-exception so that,
if the domain within which the error is thrown has no error handler, but
a domain further up the domains stack has one, the process will not
abort.

Fixes nodejs#3607 and nodejs#3653.

PR: nodejs#3654
PR-URL: nodejs/node#3654
Reviewed-By: Chris Dickinson <chris@neversaw.us>
richardlau pushed a commit to ibmruntimes/node that referenced this pull request Jan 13, 2016
Notable changes:

* buffer:
  - Buffer.prototype.includes() has been added to keep parity
    with TypedArrays. (Alexander Martin) nodejs#3567.
* domains:
  - Fix handling of uncaught exceptions.
    (Julien Gilli) nodejs#3654.
* https:
  - Added support for disabling session caching.
    (Fedor Indutny) nodejs#4252.
* repl:
  - Allow third party modules to be imported using
    require(). This corrects a regression from 5.2.0.
    (Ben Noordhuis) nodejs#4215.
* deps:
  - Upgrade libuv to 1.8.0.
    (Saúl Ibarra Corretgé) nodejs#4276.

PR-URL: nodejs/node#4281
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants