Post Reply 
HP-41CL Speed test vs. DM41X and DM42
10-17-2020, 10:24 AM (This post was last modified: 10-17-2020 12:37 PM by CY-CL.)
Post: #1
HP-41CL Speed test vs. DM41X and DM42
I made a speed test with my HP-41CL in Turbo50 mode versus DM41X and DM42.

The DM41X is 37% faster with 24MHz CPU Speed and 418% faster with 80Mhz CPU Speed than the CL.

Very interesting is the DM42, this calculator runs with WARP Speed. He is 30 times faster than the DM41X and 41 times faster than the HP-41CL

Edit: I made the speed tests with a loop.
Find all posts by this user
Quote this message in a reply
10-17-2020, 11:00 AM (This post was last modified: 10-17-2020 11:06 AM by Sylvain Cote.)
Post: #2
RE: HP-41CL Speed test vs. DM41X and DM42
These are the result I got for my DM41X and 41CL when I ran HPMike Speed Test program he posted on SM site.

DM41X results with a hundred times loop:
Code:
FAST    =>  15.27 seconds
SLOW    => 187.10 seconds

41CL results with a hundred times loop:
Code:
TURBO50 =>   5.76 seconds
TURBO20 =>  11.36 seconds
TURBO10 =>  20.75 seconds
TURBO5  =>  39.61 seconds
TURBO2  =>  99.62 seconds
TURBOX  => 190.85 seconds

HPMike DM42 result was 0.70 seconds.
Find all posts by this user
Quote this message in a reply
10-17-2020, 11:01 AM
Post: #3
RE: HP-41CL Speed test vs. DM41X and DM42
Obviously it depends on the test but I think those figures are out by quite a bit. The DM41X isn't that fast. I wouldn't expect it to be much faster than the 41CL in TURBO50 mode because the CL uses hardware emulation (NEWT CPU) while the DM41X uses software emulation running on an STM32L476 chip.

I have a benchmark that gets the calculator being tested to chew through a bunch of transcendental functions in a loop.

DM42 on USB power: 2.6 ms/iteration
DM42 on batteries: 6.5 ms/it.
DM41X on USB power: 35 ms/it.
41CL on TURBO50: 40 ms/it.
DM41X on batteries: 106 ms/it.
41CL on TURBO10: 142 ms/it.

I have another benchmark that finds all the solutions to the "N Queens" problem for a given board size (the only others I've seen stop at the first solution). Some machines were too slow to run the test on an 8×8 board so these are the results for a 7×7 board:

DM42 on USB power: 6.84s
DM42 on battery power: 16.04s
DM41X on USB power: 130.29s
41CL on TURBO50: 388.12s
DM41X on battery power: 407.32s
41CL on TURBO10: 811.87s

Clearly the DM41X has an advantage over the 41CL in integer calculations for some reason. I don't know why because they're both running the original 41CX ROM.

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
10-17-2020, 11:33 AM (This post was last modified: 10-17-2020 11:34 AM by Sylvain Cote.)
Post: #4
RE: HP-41CL Speed test vs. DM41X and DM42
(10-17-2020 11:01 AM)grsbanks Wrote:  I don't know why because they're both running the original 41CX ROM.
All ROMs in a 41CL are stored in a speed modified padded 16 bits ROM format on which 2 bits (bit 13 & 12) are used to specified dynamic speed change when code is running.
So, even though TURBO50 (x50) is active, some MCode instructions will still be running at TURBOX (x1) for compatibility reason.

Extract taken from the 41CL User Manual:
Quote:The Turbo Functions give you control over the operating speed of the calculator.
The performance in Turbo mode is not linear, because some operations must always occur at normal speed.
For example, scanning the keyboard (which is done once per program line) always executes at normal speed.
Similarly, accessing the display for any reason always executes at normal speed.
All accesses of a physical Port occur at normal speed, along with a number of timing loops in the Operating System and Timer functions.

Turbo mode is explained in details in NEWT Microprocessor Technical Manual, pages 127 to 129.

Sylvain
Find all posts by this user
Quote this message in a reply
10-17-2020, 02:16 PM
Post: #5
RE: HP-41CL Speed test vs. DM41X and DM42
Absolutely, I do know that the speed increase is not linear and that TURBO50 will not make programs run 5× faster than TURBO10. That's not what puzzled me.

What puzzled me is the difference in relative speeds for the two machines.

For the first test, a DM41X on USB power completes it in more or less the same time as a 41CL running in TURBO50 mode (35ms per iteration vs. 40ms). For the second test, the DM41X on USB power is 3× faster than a 41CL in TURBO50 mode.

The stopwatch is used in the same way for both tests.

Neither test uses any instructions from a physical module (so no i/o on the expansion bus is needed).

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
10-17-2020, 03:34 PM
Post: #6
RE: HP-41CL Speed test vs. DM41X and DM42
(10-17-2020 11:01 AM)grsbanks Wrote:  Obviously it depends on the test but I think those figures are out by quite a bit. The DM41X isn't that fast. I wouldn't expect it to be much faster than the 41CL in TURBO50 mode because the CL uses hardware emulation (NEWT CPU) while the DM41X uses software emulation running on an STM32L476 chip.

I have a benchmark that gets the calculator being tested to chew through a bunch of transcendental functions in a loop.

DM42 on USB power: 2.6 ms/iteration
DM42 on batteries: 6.5 ms/it.
DM41X on USB power: 35 ms/it.
41CL on TURBO50: 40 ms/it.
DM41X on batteries: 106 ms/it.
41CL on TURBO10: 142 ms/it.

I have another benchmark that finds all the solutions to the "N Queens" problem for a given board size (the only others I've seen stop at the first solution). Some machines were too slow to run the test on an 8×8 board so these are the results for a 7×7 board:

DM42 on USB power: 6.84s
DM42 on battery power: 16.04s
DM41X on USB power: 130.29s
41CL on TURBO50: 388.12s
DM41X on battery power: 407.32s
41CL on TURBO10: 811.87s

Clearly the DM41X has an advantage over the 41CL in integer calculations for some reason. I don't know why because they're both running the original 41CX ROM.

Interesting comparison. Can you run these for a stock 41CX for reference?
Find all posts by this user
Quote this message in a reply
10-17-2020, 03:35 PM
Post: #7
RE: HP-41CL Speed test vs. DM41X and DM42
(10-17-2020 10:24 AM)CY-CL Wrote:  Very interesting is the DM42, this calculator runs with WARP Speed. He is 30 times faster than the DM41X and 41 times faster than the HP-41CL

As stated elsewhere, the DM42 runs Free42 which is a stand-alone program, not running on an emulation layer.
Find all posts by this user
Quote this message in a reply
10-17-2020, 04:10 PM
Post: #8
RE: HP-41CL Speed test vs. DM41X and DM42
(10-17-2020 03:34 PM)smartin Wrote:  Interesting comparison. Can you run these for a stock 41CX for reference?

I tested a 41C with a handheld stopwatch a long time ago, before I bought a Time Module (or a 41CX).

It went through the transcendental functions in about 1.4 seconds per iteration. It solved all the "N Queens" layouts for a 7×7 board in 5547 seconds.

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)