On Thursday, April 4, 2013 11:40:54 PM UTC-4, Forrest L Norvell wrote:
>
> However, putting everything in try/catch/finally clauses is expensive
> (i.e. they can't be fully optimized by V8).
This is slightly misleading. In the following code:
```js
try {
doStuff();
} catch (e) {
// handle somehow
}
function doStuff() {
// do some stuff
}
```
the code inside `doStuff` is still optimized by V8. The only code that is
not optimized is that directly inside the `try` block, i.e. the call
`doStuff()` itself. I'm not sure if optimizations matter, or are even
possible, for code that simple---so if you follow a pattern like this,
try/catch should have no performance impacts.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.