2 ms·
Go programmers also tend to have terminal systems brain, so the runtime cost of panic tends to bother them to their core :)
by whateveracct 6y ago
Go programmers also tend to have terminal systems brain, so the runtime cost of panic tends to bother them to their core :)
- erik_seaberg 6y agoIf they used unwind tables for panic, it would be cheaper than a deeply nested stack of mispredicted “if err != nil” branches. But according to https://dr-knz.net/go-calling-convention-x86-64.html https://dr-knz.net/go-calling-convention-x86-64.html they don’t, probably because you can randomly defer stuff anywhere and it isn’t statically scoped.