Next Previous Contents

2. Don't declare auto variables in nested function blocks

Variable declarations in nested blocks are usually a good thing. But with cc65, there is a drawback: Since the compiler generates code in one pass, it must create the variables on the stack each time the block is entered and destroy them when the block is left. This causes a speed penalty and larger code.


Next Previous Contents