Does a catch attempt really affect performance?

does it try/catchaffect performance if an exception is not thrown in the block try?
What about try/catch/finally?

+3
source share
4 answers

No try/catch, no try/catch/finallyit does not affect performance in any significant degree. Exceptions are created, of course, affect performance (namely, they are caught or not)

Do try / catch functions eliminate blocks if exceptions are not thrown?

+9
source

. , , .

, try/finally. finally - , . , , .

+2

try/catch , ( - try/catch, ).

try/catch/finallydoes not add any additional premiums to try/catch.

+2
source

No, the try / catch block does not bear any value unless an exception is thrown.

Check out the great MSDN article about it here: http://msdn.microsoft.com/en-us/library/ms973839.aspx

0
source

Source: https://habr.com/ru/post/1781285/


All Articles