50g group photo

Yahoo Groups archive

50g

Archive for 50g.

Index last updated: 2026-03-30 00:59 UTC

Message

Re: Performance issue; what am I missing here?

2010-01-20 by Tim

> What am I missing here?

Also, you could see what is going on quite easily by running your program through the built in debugger.

Type 10 10 and then recall your program to the stack. Go into PRG->NXT NXT->RUN and press DBUG. The program can now be stepped through using SST (single step) and you will step through and see what is going wrong.

To make this program better, I modifed it to use the built in timing capability. Observe:

<<
<< -> I J
<< I J * .1 J
FOR A 1. I
FOR B B I / A + D->R SIN
NEXT
NEXT
>>
>> TEVAL DUP UNROT /
>>

Since there is nothing before the second << like a local variable declaration, it silently pushes the program to the stack. This is then evaluated by TEVAL which returns the time. I then make a copy and stick it on level 3, and divide to give the loops per second.

Tried it in approximate mode yet? :-)

TW

Attachments