Is there a cost to try catch blocks?

12 gsky 1 7/14/2025, 6:49:12 PM brandewinder.com โ†—

Comments (1)

slowcache ยท 1h ago
I didn't think that this was much of a thing that needed to be investigated. Adding additional processing into your code will make it slow down.

On a related note, I had a consultant come into my work one time to the teach us some pragmatic things in C++. One of the lessons was that that gcc will not attempt to reorder the code within a try block to optimize it. This could be leading to some very minute slowdown in a C++ app in addition to the overhead associated with try/catch as a whole