Hacker News new | ask | show | jobs
by nurettin 2321 days ago
Code paths introduced in order to execute any potential stack unrolling are inefficient and they make your code slow. Especially tight loops. This was common knowledge back in 2000s.
1 comments

Common knowledge, but not correct. Code to destroy objects has to be generated for regular function returns, and is jumped into by the exception handler too. Managing resources by hand, instead, would also require code, but you have to write it. Its expense arises from its fragility.
What I meant was inserting stack frames into assembly, which are dissimilar to calling free, slowing things down.