mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
Remove paragraph about limitations that do no longer exist
git-svn-id: svn://svn.cc65.org/cc65/trunk@35 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
7f563d0349
commit
012470bdcb
@ -14,16 +14,10 @@ How to generate the most effective code with cc65.
|
|||||||
2. Don't declare auto variables in nested function blocks.
|
2. Don't declare auto variables in nested function blocks.
|
||||||
|
|
||||||
Variable declarations in nested blocks are usually a good thing. But with
|
Variable declarations in nested blocks are usually a good thing. But with
|
||||||
cc65, there are several drawbacks:
|
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
|
||||||
a. The compiler has only one symbol table (there's no true nesting).
|
and destroy them when the block is left. This causes a speed penalty and
|
||||||
This means that your variables must not have the same names as
|
larger code.
|
||||||
variables in the enclosing block.
|
|
||||||
|
|
||||||
b. Since the compiler generates code in one pass, it must create the
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -137,8 +131,8 @@ How to generate the most effective code with cc65.
|
|||||||
|
|
||||||
10. Use the preincrement and predecrement operators.
|
10. Use the preincrement and predecrement operators.
|
||||||
|
|
||||||
The compiler is currently not smart enough to figure out, if the rvalue of
|
The compiler not always smart enough to figure out, if the rvalue of an
|
||||||
an increment is used or not. So it has to save and restore that value when
|
increment is used or not. So it has to save and restore that value when
|
||||||
producing code for the postincrement and postdecrement operators, even if
|
producing code for the postincrement and postdecrement operators, even if
|
||||||
this value is never used. To avoid the additional overhead, use the
|
this value is never used. To avoid the additional overhead, use the
|
||||||
preincrement and predecrement operators if you don't need the resulting
|
preincrement and predecrement operators if you don't need the resulting
|
||||||
@ -338,3 +332,4 @@ How to generate the most effective code with cc65.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user