Skip to content

Duplicate decision logic in a node: Decision tree optimisation? #4

@m0rjc

Description

@m0rjc

The numbers nodes produce multiple transitions which share the 0 to 9 condition. It would be nice to be able to render nodes with such common code as decision trees so reducing the duplication of code.

This would make the model a little more complex, or make the assembly builder a little more complex, depending on where the optimisation is done.

Cutting out the 0-9 test would save 6 instructions in each Numbers node.

The Numbers Nodes also duplicate commands, though optimising these would require re-ordering of the logic with care of side effects so would be challenging to automate! manual re-writing of these nodes, or generation of custom logic using a special subclass of Node, could save some space on the microcontroller.

For example, at time of writing, see "step_gps_State_0015" in M0RJCTracker's gps.asm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions