[Oberon] INC(i) vs i := i + 1

Joerg joerg.straube at iaeth.ch
Wed May 5 12:29:37 CEST 2021


Chris
Thx, for pointing this out.
Jörg

Am 05.05.21, 12:05 schrieb "Oberon im Auftrag von Chris Burrows" <oberon-bounces at lists.inf.ethz.ch im Auftrag von chris at cfbsoftware.com>:

    > 
    > From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of Joerg
    > Sent: Wednesday, 5 May 2021 6:00 PM
    > To: ETH Oberon and related systems
    > Subject: Re: [Oberon] INC(i) vs i := i + 1
    > 
    > Just as an example, find below the output of the RISC5 compiler:
    > 
    > The statements  i := i+1;  and  INC(i);  generate exactly the same output,

    That is true if i is a local or global variable or a value parameter. However, if i is a VAR parameter, the INC version generates one less instruction.

    Regards,
    Chris Burrows
    CFB Software
    https://www.astrobe.com


    --
    Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
    https://lists.inf.ethz.ch/mailman/listinfo/oberon




More information about the Oberon mailing list