Speed Test
Speed Test
I have run different versions of this speed test on many of my calculators. The DM41X coding is as follows:
LBL <t>SPEED
STO 10
TIME
HR
STO 00
0
STO 11
1
STO 12
LBL 01
ATAN
SIN
E^x
3
1/X
Y^x
ST+ 11
RCL 12
1
+
STO 12
DSE 10
GTO 01
TIME
HR
RCL 00

3600
*
END
To run, place a loop counter value in the Xregister and XEQ SPEED
The result in the Xregister is the elapsed time in seconds.
My result with 100 loops is 16.98 seconds
By comparison, the result on my DM42 with 100 loops is 0.70 seconds
So, the DM42 is about 24 times faster than the DM41X with this test.
LBL <t>SPEED
STO 10
TIME
HR
STO 00
0
STO 11
1
STO 12
LBL 01
ATAN
SIN
E^x
3
1/X
Y^x
ST+ 11
RCL 12
1
+
STO 12
DSE 10
GTO 01
TIME
HR
RCL 00

3600
*
END
To run, place a loop counter value in the Xregister and XEQ SPEED
The result in the Xregister is the elapsed time in seconds.
My result with 100 loops is 16.98 seconds
By comparison, the result on my DM42 with 100 loops is 0.70 seconds
So, the DM42 is about 24 times faster than the DM41X with this test.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973.
Re: Speed Test
DM41X Results:
41CL Results:
Code: Select all
FAST => 15.27 seconds
SLOW => 187.10 seconds
Code: Select all
TURBO50 => 5.76 seconds
TURBO20 => 11.36 seconds
TURBO10 => 20.75 seconds
TURBO5 => 39.61 seconds
TURBO2 => 99.62 seconds
TURBOX => 190.85 seconds
[DM1x/DM1xL/DM41/DM41L/DM41X/DM42]
Re: Speed Test
I have a benchmark program that looks like this:
The idea is, you ASTO the name of the program to run in R99, set the stack up as you want it when entering the program to benchmark and then XEQ "BMARK". It'll go away and do it and when finished, the stack will be as your benchmarked program meant to leave it and the stopwatch will display the time taken to execute it.
I also use a summation based benchmark that does the same calculation:
Set the test run up with [Alpha] SUMM [Shift] ASTO 99 [Alpha]
Run the SUMM benchmark through BMARK for 100 iterations:
100 XEQ [Alpha] BMARK [Alpha]
00:00:12.21*R00
Code: Select all
LBL "BMARK"
STO 98
CLX
SETSW
X<> 98
RUNSW
XEQ IND 99
STOPSW
SW
END
I also use a summation based benchmark that does the same calculation:
Code: Select all
LBL "SUMM"
ABS
INT
X=0?
RTN
STO 01
3
1/x
0
LBL 01
RCL 01
ATAN
SIN
E^X
RCL Z
Y^X
+
DSE 01
GTO 01
END
Run the SUMM benchmark through BMARK for 100 iterations:
100 XEQ [Alpha] BMARK [Alpha]
00:00:12.21*R00
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Re: Speed Test
Not entirely surprising given that the DM42 is running native code (Free42 compiled for the STM32 CPU) while the DM41X is an emulator running the 41CX ROM.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Re: Speed Test
Why not make it independent of numbered registers? Just put the name of the program in Alpha, set up the stack and XEQ"BMARK"grsbanks wrote: ↑Wed Oct 14, 2020 9:28 amI have a benchmark program that looks like this:
Code: Select all
LBL "BMARK" STO 98 CLX SETSW X<> 98 RUNSW XEQ IND 99 STOPSW SW END
Code: Select all
LBL "BMARK"
SIGN
CLX
SETSW
X<> L
RUNSW
ASTO L
XEQ IND L
STOPSW
SW
END
42S #3249S01123
DM42 #00345
DM42 #00345
Re: Speed Test
Because you can't benchmark a program that uses alpha data if you do that.
OK, you can't benchmark a program that expects data in R98 or R99 with my system, but that eventuality is far less probable than wanting to benchmark something that expects data in the alpha register. But full marks for backing up X in L using SIGN and LASTX and avoiding the use of R98 I hadn't thought of that and will alter my benchmarker accordingly.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Re: Speed Test
The difference is even more dramatic if you run the DM41X in SLOW mode, the DM42 is almost 300 times faster !
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973.
Re: Speed Test
This is the price to pay for the full 41 microcode compatibility that allows you to use the large library of modules developed for he HP41
DM42: 00425  DM41X: β00066
Re: Speed Test
about this, I tested a short integral from an old thread in HP Museum:
in DM41X with Advantage module create a function FX:
Code: Select all
LBL "FX"
1
X<>Y

SQRT
1/X
END
Code: Select all
FIX 02
ALPHA: FX
0 ENTER 1
XEQ INTEG
Fast: 00:08:26
In DM42 (accuracy 0.01):
Code: Select all
00 { 19Byte Prgm }
01▸LBL "FX"
02 MVAR "X"
03 RCL "X"
04 +/
05 1
06 +
07 SQRT
08 1/X
09 RTN
10 END
Code: Select all
∫f(x) > LLIM 0 ULIM 1 ACC 0.01, ∫
DM42 (acc 0.001): 4s
But we already knew that.
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s  Free42
Re: Speed Test
Is this true for all modules, or only some ? From what I can tell, program POLY in module MATH works fine with the DM41X set to FAST mode.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973.