Why is it that V8 is unable to optimize try-catch-finally blocks, when other prominent runtimes (SpiderMonkey, Chakra) seem to have no problems with this?
There is no particular reason other than the issue has a relatively low priority.
This will be optimized at some point
Check this out chromium v8 issue 1065
If you target v8 you can move try-catch to separate function, but you should do this only if it's a real performance issue otherwise its just premature optimization.
"Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%" - Donald Knuth
The only function that most likely will never be optimized are
Other issues with optimization should be fixed at some point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With