top | item 45783266

(no title)

neonz80 | 4 months ago

That's a different type of overhead than having unwind tables. With exceptions you wouldn't need a branch after each function call at all.

discuss

order

amelius|4 months ago

But a branch that is (almost) never taken has an overhead close to the overhead of a NOP instruction, which may be negligible on modern architectures.

neonz80|4 months ago

The CPU can not remember an infinite number of branches. Also, many branches will increase code size. With exceptions the unwind tables and unwind code can be placed elsewhere and not take up valuable L1 cache.