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: 65
Joined: Tue Sep 12, 2017 2:34 pm
Location: Rabat, Morocco

Question about speed difference (DM15L vs DM41L)

Post by Boub65 » Mon Jan 08, 2018 6:02 pm

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.
2xDM15L, DM41L
DM42 SN#00855

grsbanks
Posts: 680
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: Question about speed difference (DM15L vs DM41L)

Post by grsbanks » Tue Jan 09, 2018 6:34 am

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.
Not SwissMicros staff, just an enthusiast.

Boub65
Posts: 65
Joined: Tue Sep 12, 2017 2:34 pm
Location: Rabat, Morocco

Re: Question about speed difference (DM15L vs DM41L)

Post by Boub65 » Tue Jan 09, 2018 3:09 pm

@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?
2xDM15L, DM41L
DM42 SN#00855

grsbanks
Posts: 680
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: Question about speed difference (DM15L vs DM41L)

Post by grsbanks » Tue Jan 09, 2018 10:04 pm

Boub65 wrote:
Tue Jan 09, 2018 3: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.
Not SwissMicros staff, just an enthusiast.

Boub65
Posts: 65
Joined: Tue Sep 12, 2017 2:34 pm
Location: Rabat, Morocco

Re: Question about speed difference (DM15L vs DM41L)

Post by Boub65 » Wed Jan 10, 2018 2:55 pm

grsbanks wrote:
Tue Jan 09, 2018 10: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?
2xDM15L, DM41L
DM42 SN#00855

Post Reply