I've seen a number of articles, and questions all of which focus on the cost of exceptions, performance benchmarks, so and so.
But nothing really seems to explain Why it is so slow. What really happens under-the-hood so that its magnitudes slower when one is thrown. Most articles just say stack unwinding is what makes it slow. But I don't understand why that makes it magnitudes slower.
From a brief understanding of SEH, basically every time a thread enters a try block, it has add say, some kind of a marker to that location onto its Exception Chain in the TIB. That has its costs, while trying to walk back the stack. I understand that part. But I doubt that's even half the story considering the magnitude of the performance loss. Also, why do you even have to unwind the stack if the exception is being caught in the same function. Why is that case still equally slow?
Could someone please explain what really is going on in simple terms?