Re: TIB: program speed


[Prev][Next][Index][Thread]

Re: TIB: program speed




ilya winham wrote:
> 
> If C=2
> Q+1->Q
> Is correctly written:
> Q+(C=2)->Q
> If C is 2 then Q will increase by 1
> IF C is not 2 then Q will increase by 0
> This works if you only want to add 1 to a variable, nothing else.
> This IS the fastest way to optimize If statements and faster than the
> 'normal' way.
> 
Well, I suppose you're right for the example I gave. However, this can 
be changed by simply adding a coefficient to the logic statement.
:Q+A(C=2->Q
Now, if C=2 Q will increase by A, if C<>2 Q will not change. Note the 
lack of closing ); it isn't needed, and you can save mem by leaving it 
off.

Jody Snider
jody1@alaska.net


References: