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 vincentgoudreault

--- In 50g@yahoogroups.com, "Tim" <timwessman@...> wrote:
>
> > 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.


I used the debugger to ensure the flow of the program was going OK. I am an old timer with the HP48, I bought it -- darn, can't believe it! -- nearly 20 years ago, in 1991. Did a lot of code development on it, prefer its form factor to that of the 50 (the ENTER key has to be on the left side, above the number keys, on a properly designed HP calculator...) and the 48 is a lot gentler on its batteries than the 50 is, even when not in use.

>
> To make this program better, I modifed it to use the built in timing capability. Observe:
>
> <<
> << -> I J
> << I J * .1 J


I assume you meant 1. here


> 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.


You version returns a rating 10% better, a bit higher than the original version.

>
> Tried it in approximate mode yet? :-)

Just did (see previous message).

Still vaguely disappointed at the relatively small gain in performance (3 to 1) when compared with the HP48. I suppose really cranking it up would involve going away from RPL.


CBVG

Attachments