News for hackers. Stuff that matters.
Re:Enable Node.js to Run with Microsoft's ChakraCore Engine by Klathmon on Tuesday January 19, 2016 @03:21PM (#10933671)
It does!

V8 has expressed interest in fixing the try/catch deopt, but it keeps falling behind on their list because not many people are using it.

Most people aren't using it because V8 (and in some minds, mine included until 5 days ago, all of Javascript) doesn't optimize it.

It's a bit of a catch 22, and having alternate engines where that deopt doesn't happen can be the way out.

Basically having an alternate engine makes sure that stuff like this doesn't become permanent. You'll probably avoid try/catch in performance code for the near future (and i'll most likely do it as well), but the hope is that multiple implementations will force V8 to fix that issue (if it can be called that) at some point and eventually this little bit of optimization will no longer be necessary.

Re:Enable Node.js to Run with Microsoft's ChakraCore Engine by STRML on Tuesday January 19, 2016 @08:09PM (#10935359)
> it keeps falling behind on their list because not many people are using it.

How can that be true? try/catch is as common a JS idiom as a for loop.

This causes significant trouble all over React and many other libraries, as many hot areas of code are covered in try/catches to ensure developer error doesn't blow the whole render. Optimizing it could lead to pretty serious performance gains.

Re:Enable Node.js to Run with Microsoft's ChakraCore Engine by chrisseaton on Tuesday January 19, 2016 @03:45PM (#10933863)
I don't think V8 deoptimises on a try-catch - I think it doesn't optimise in the first place. It's a bailout rather than an uncommon trap I believe.
Re:Enable Node.js to Run with Microsoft's ChakraCore Engine by lttlrck on Tuesday January 19, 2016 @06:56PM (#10935053)
We already have alternate engines in web browsers.