[swift-users] Swift error management - investigate what's behind

Jérôme Duquennoy jerome+swift at duquennoy.fr
Mon Mar 6 07:35:39 CST 2017


Hi guys,

I am right now building a presentation of the swift error management system for some of my colleagues.
I can explain how it works from a dev’s standpoint, and how it interacts with obj-c. But I would like to have a deeper understanding of it, and notably to understand what the compiler does when a do … try block is found, how it knows that there is such a block at the current level of the stack and jumps to it, …
I have notably noticed that exceptions are much slower than a simple “return” when building without optimisation, while it is just as fast when optimisations are enabled. I would like to understand what causes that difference.

Sadly, I have not dived into the sources of swift up to now, which makes the beginning of the investigation a bit hard.
Could anyone point me to some starting place where I could begin ?

Thanks for your help !

Jerome


More information about the swift-users mailing list