Question about speed difference (DM15L vs DM41L)

This is the place to discuss the usage of DM1x/DM41 machines and to share any tips & tricks you may have stumbled across.

If discussing a specific model, please ensure that you prefix topic subjects with the model number this way:

[DM41] How to change the number of program steps available
Post Reply
Boub65
Posts: 231
Joined: Tue Sep 12, 2017 4:34 pm
Location: Rabat, Morocco

Question about speed difference (DM15L vs DM41L)

Post by Boub65 »

Hi all,
I tested exactly the same program (checking for a prime number) on my DM15L and DM41L and found an impressive speed difference !
@48MHz (checking for 90709 prime) :
- DM15L took 8s
- DM41L took 38s

That makes the DM15L nearly 5x faster than the DM41L?

I understand that they use exactly the same hardware and NUT processor emulator, so it must be the DM15L "code interpreter" that is faster. But 5x faster that's huge!

Any clue/infos?

Sincerely,
Boubker.
Sincèrement, Sincerely, 73,
Boubker

DM15L, DM41L, DM42 #00855 (domes upgraded), DM41X #00707
HP48SX (with dark screen), HP42s, HP32SII (1990 with fraction bug), HP41C/CV
TI-89 titanium, CASIO fx-cg50 and Numworks (to play with micropython)
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: Question about speed difference (DM15L vs DM41L)

Post by grsbanks »

I found similar results in a benchmark where I tested, among other machines, my DM41L and my DM11L.

I suspect the original HP-15C was faster than the HP-41C(V/X) because it is a later machine. The HP-41C was produced from 1979 onwards and the HP-15C from 1982 onwards.

I will soon be able to put that theory to the test with my HP-15C winging its way to me from overseas as we speak.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Boub65
Posts: 231
Joined: Tue Sep 12, 2017 4:34 pm
Location: Rabat, Morocco

Re: Question about speed difference (DM15L vs DM41L)

Post by Boub65 »

@grsbanks
My guess was that the HP-1xC series use a "finite" set of labels (max 25), registers (less than 100) and instructions/functions (mapped three max to one with keyboard), whereas the HP-41C(V/X) deal with "infinite" set of labels (alphanumerical labels), registers and instructions (alphanumerical instructions/functions and new functions in ROMs).

So the HP-1xC interpreter can map the labels/instructions/functions to a vector or a matrix (and make direct accesses), whereas the HP-41C(V/X) interpreter must deal with lists with alphanumerical entries (and make indirect accesses).

I'm not sure that in 1979 lists where programmed (optimized) with hashing etc...

But my guess still does not explain a 5x difference in speed?
Sincèrement, Sincerely, 73,
Boubker

DM15L, DM41L, DM42 #00855 (domes upgraded), DM41X #00707
HP48SX (with dark screen), HP42s, HP32SII (1990 with fraction bug), HP41C/CV
TI-89 titanium, CASIO fx-cg50 and Numworks (to play with micropython)
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: Question about speed difference (DM15L vs DM41L)

Post by grsbanks »

Boub65 wrote:
Tue Jan 09, 2018 4:09 pm
So the HP-1xC interpreter can map the labels/instructions/functions to a vector or a matrix (and make direct accesses), whereas the HP-41C(V/X) interpreter must deal with lists with alphanumerical entries (and make indirect accesses).
Once a GTO (or XEQ) instruction has been executed once in the HP-41/42, the offset to the label is cached inside the actual GTO/XEQ instruction, so the machine only needs to search for the label once. Second and subsequent jumps can happen almost immediately.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Boub65
Posts: 231
Joined: Tue Sep 12, 2017 4:34 pm
Location: Rabat, Morocco

Re: Question about speed difference (DM15L vs DM41L)

Post by Boub65 »

grsbanks wrote:
Tue Jan 09, 2018 11:04 pm
Once a GTO (or XEQ) instruction has been executed once in the HP-41/42, the offset to the label is cached inside the actual GTO/XEQ instruction, so the machine only needs to search for the label once. Second and subsequent jumps can happen almost immediately.
Yes you are right for the offset...

But every single time you have to interpret an alphanumerical label or XEQ in the HP-41C(V/X) you still have to lookup in a list with alphanumerical entries for this offset. And this operation takes time in a HP-41C(V/X) vs a straight forward vector lookup table for the HP-1xc and it's numerical labels/XEQ. No?
Sincèrement, Sincerely, 73,
Boubker

DM15L, DM41L, DM42 #00855 (domes upgraded), DM41X #00707
HP48SX (with dark screen), HP42s, HP32SII (1990 with fraction bug), HP41C/CV
TI-89 titanium, CASIO fx-cg50 and Numworks (to play with micropython)
Post Reply