Performance Considerations for throwing Exceptions

前端 未结 8 1101
旧时难觅i
旧时难觅i 2020-12-19 03:17

I have come across the following type of code many a times, and I wonder if this is a good practice (from Performance perspective) or not:

try
{
    ... // s         


        
8条回答
  •  春和景丽
    2020-12-19 04:07

    Wait.... why do we care about performance if an exception is thrown? Unless we're using exceptions as part of normal application flow (which is WAYYYY against best practise).

    I've only seen performance requirements in regards to success but never in regards to failure.

提交回复
热议问题