1

Does exception handling hurts the performance of the code in terms of execution speed? Does it have any drawback? What precautions one must take when using exception handling in code?

Rajat Varlani
  • 456
  • 1
  • 4
  • 19
  • 3
    Since exceptions should only be thrown in the case of *unexpected exceptions*, their performance should hardly matter since you should ideally never see them. – deceze Jan 02 '14 at 13:01
  • I'd say worrying about the performance impact of exceptions is premature optimisation. It's unlikely to make any difference, but even if it did, you should still have robust error handling throughout your application. – halfer Jan 02 '14 at 13:30

0 Answers0