Re: TIB: program speed


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

Re: TIB: program speed




Jeremy Braun wrote:
> 
> > Yes, when a calculator encounters an If statement with a False boolean,
> > it ignores the next command completely.
> 
> Nope, it Can't (unless something else is true, noted below)!  An if/then
> statement on 85/86/82/83 the next line after the if is then, so it has to
> check (92 is on same line, so its different)UNLESS-an if/then loop is
> tokenized as a single token.  ie-the token for an if check is different for
> an if/then/else/end check.
> 
> Just a thought,
> Jeremy Braun
> 
> PS-don't know much about the tokens on calcs, anyone know what exactly is
> replaced, and if I'm right or wrong?
> 
> Also, on of the reasons that Q/(C==2->R is slow is that the calc has to do a
> test, then a division, and then a memory transfer.  And division is
> notoriously slow on computers...the if loop simply does a test and then the
> memory transfer, minus the division. :)

Wow! I'm sure if I had understood that, I would have learned a lot. :)
Okay...It sounds like, from your first paragraph, that you're talking 
about If, THEN statements. I was thinking more along the lines of
If <logic statement>
<do a command>
Next, what is a token? What is tokenization? What is happening? Why is 
it important?
In my original example it was Q+(C=2->Q, not division. (Note the 
single =. I'm using an 83, so I don't need the ==) But I don't think 
that is important - it COULD have been a division. So, if I'm getting 
this right, you're saying that it is FASTER to do 
:If C=2
:Q+1->Q  (or Q/5->Q or whatever)

and it is SLOWER to do
:Q+(C=2->Q

Do I got it right?

Jody Snider
jody1@alaska.net


Follow-Ups: References: