4 ms·
That's true - how about repeating the test with valid code that DOESN'T throw an exception. - Edit - Just tried it, it's not even close (on FF4): tryCatch wi
by porlw 14y ago
That's true - how about repeating the test with valid code that DOESN'T throw an exception.
- Edit -
Just tried it, it's not even close (on FF4):
tryCatch with undef - ~55,000
ifCheck with undef - ~2,000,000
tryCatch with Object - ~100,000,000
ifCheck with Object - ~2,000,000
So if an error is not thrown the try/catch expression is WAY faster.