Appropriate use of coding constructs is evaluated to determine the efficiency of software as it relates to use of RAM. Software is measured against the functional requirements to evaluate fitness for purpose.
Using complex conditions can be more efficient than coding multiple single conditions.
In the two examples shown below, the inefficient code makes use of two separate simple conditions and as a result, requires two IF statements.
The efficient version requires only one selection statement. This is because a complex condition is used as part of the IF statement.This achieves the same outcome but places less demand on the processor and available RAM.