[Oberon] Alternatives for cases.
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Thu Mar 7 17:23:10 CET 2019
Data (bytes) Code (bytes) Time (ms)
PROCs 540 1404 65
IF-ELSE 8 864 53
CASE 8 1080 42
Very interesting data!
3 questions:
1) Has the data for the CASE part been produced
with your optimized CASE statement, which uses
the "B,cond PC, [Rn]” instruction (where the target
of the branch is computed by adding the contents
of a register to the current program counter)?
2) If so, do you have data for a CASE statement that
does not use the B, cond PC, [Rn] instruction?
(my guess is that it’s about 25-50% slower, since in
my experimental implementation of the CASE statement,
the average overhead of any selection in a CASE
statement is 9 instructions - vs 6 in your version
with the modified branch instruction)
3) Is there a plan/wish/proposal from your side to make
the B, cond PC, [Rn] part of the official RISC spec?
Best,
Andreas
More information about the Oberon
mailing list