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
LBL_A
CLX STO_11
8 STO_12 STO_01
1 STO_00
LBL_00
RCL_00 RCL_12
X=Y? GTO_04
ISG_00 DEG
STO_IND_00
LBL_01
ISG_11 DEG
RCL_00 STO_10
LBL_02
DSE_10 DEG
RCL_10 X=0? GTO_00
RCL_IND_00 RCL_IND_10 -
X=0? GTO_03
ABS RCL_00 RCL_10 -
X<>Y? GTO_02
LBL_03
DSE_IND_00 GTO_01
DSE_00 GTO_03
LBL_04
RCL_11
BEEP
RTN
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
or
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.
|