|Re: Calculator Benchmark|
Message #43 Posted by Xerxes on 8 Feb 2007, 7:05 p.m.,
in response to message #42 by Gerson W. Barbosa
8 STO_12 STO_01
RCL_10 X=0? GTO_00
RCL_IND_00 RCL_IND_10 -
ABS RCL_00 RCL_10 -
This is the fastest version possible for HP-41. I have tried out any combination possible. All DSE's and ISG's makes the execution faster.
If I run the program without any DSE and ISG like the HP-32S version, it takes 1198 seconds. Now with 1062 sec it is faster than the old version with 1120 sec. Albert Graef's program showed me, that I have not enough practice in RPN. I have optimized the sequence after ABS. I think the HP-41/42 version is complete now.
Are you sure, that DSE is also slower than this code?
1 STO-(i) RCL(i)
x<>0? GTO B
1 STO- X
RCL X x<>0? GTO D
If yes, it's really curious.
If no possibly you can reduce the execution time on your calculators again. ;-)
Before starting measurement, I execute the PACK command and then start the program for running e.g. for 10 seconds before interrupting. Otherwise maybe you have a longer execution time on the first run.
If somebody is good in Prolog, a version (recursive of course) in this language is also welcome for the PB-2000C's Prolog-Card.