[Oberon] Numeric CASE vs IF THEN ELSE Performance

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Fri Jun 29 19:54:47 CEST 2018


    > The standard branch via register instruction is
    > 
    >   BR,cond [Rn]
    > 
    > The new variant of this instruction is
    > 
    >   BR,cond PC,[Rn]
    > 
    > i.e. the target of the branch is computed by adding the
    > contents of register n to the current program counter.
    > 
    > Consequently, the average overhead of any selection
    > in a CASE statement, including range checking,
    > is now a constant 6 instructions. 


Just for the record: With the original “standard” branch via
register instruction BR,cond [Rn], as currently defined in
RISC, that number is a constant 8 instructions.

so.. it’s 8 vs 6










More information about the Oberon mailing list