samedi 28 mars 2015

Exceptions - What really happens?


Vote count:

0




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.


Could someone please explain what really is going on in simple terms?



asked 53 secs ago







Exceptions - What really happens?

Aucun commentaire:

Enregistrer un commentaire