micropython

docs/optimisations.txt

141:bd6baced90ab
2008-09-07 Paul Boddie Added a summary of current optimisations.
     1 Optimisation                    Prerequisites and Effect
     2 ------------                    ------------------------
     3 
     4 constant_storage                value instruction references a constant;
     5                                 storage instruction references a constant;
     6                                 remove both instructions (currently a single merged instruction)
     7 
     8 source_storage                  source instruction is a simple input operation;
     9                                 source instruction is the last instruction;
    10                                 remove the source instruction
    11 
    12 known_target                    value instruction references a constant;
    13                                 target and context are provided (no instructions removed)
    14 
    15 self_access                     value instruction references "self" in a method;
    16                                 specified attribute name always has the same position;
    17                                 appropriate instruction generated
    18 
    19 temp_storage                    value instruction is a simple input operation;
    20                                 value instruction is the last instruction;
    21                                 remove the value instruction, provide the value
    22                                 instruction in place of a temporary storage
    23                                 reference
    24 
    25 load_operations                 value instruction is a simple input operation;
    26                                 value instruction is the last instruction;
    27                                 current instruction uses simple input;
    28                                 remove the value instruction, make the value
    29                                 instruction the input to the current instruction
    30 
    31 no_operations                   input to the current instruction loads from the
    32                                 destination of the current instruction;
    33                                 omit the current instruction
    34 
    35 unused_results                  value instruction is a simple input operation;
    36                                 value instruction is the final instruction of a
    37                                 discarded expression;
    38                                 remove the value instruction
    39 
    40 superfluous_temp_operations     source instruction writes to temporary storage;
    41                                 current instruction reads from the same storage;
    42                                 source instruction is the last instruction;
    43                                 remove the source instruction, make the current
    44                                 instruction use the input of the source
    45                                 instruction