6 ms·
Link about v8 performance cost of try/catch. http://floitsch.blogspot.in/2012/03/optimizing-for-v8-introduction.html http://floitsch.blogspot.in/2012/03/optimi
by rakeshpai 14y ago
Link about v8 performance cost of try/catch.
http://floitsch.blogspot.in/2012/03/optimizing-for-v8-introduction.html http://floitsch.blogspot.in/2012/03/optimizing-for-v8-introd...
"It turns out that some constructs are not yet supported by Crankshaft. In particular, try/catch turns off all optimizations in a function."
- ef4 14y agoYes, but only in the function where the try catch appears. Whatever you call from there, even if it's protected within the stack of the try/catch statement, is still optimizable. So entering a try/catch once and then doing all your work inside it is still fast. What's expensive is constantly entering new try/catch contexts.