Speed comparison Swissmicros / HP
12-23-2015, 10:27 PM (This post was last modified: 01-26-2016 08:16 PM by Bernd Grubert.)
Post: #1
 Bernd Grubert Member Posts: 61 Joined: Dec 2013
Speed comparison Swissmicros / HP
I have used the Bessel function of first kind to carry out a benchmark for some models of SwissMicros and HP. The program is taken from the book "HP-41 Extended Functions Made Easy" by Keith Jarett, Synthetix, 1983.
It can run on the HP-41C and the HP-15C with nearly the same code. The only modifications necessary is the conversion of the register and label numbers from one to two digits. The program for the 15C-calculator is listed at the bottom of the message. I calculated J(50,50.0). The calculator returned 0.1214090222 (result from Wolfram Alpha: 0.1214090218976...)

Here are the execution times:
Code:
calculator  |  execution time  |  remarks ------------+------------------+----------- HP-41CV     |        87.6 sec  | HP-41CL     |        85.1 sec  |  TURBOX HP-41CL     |         4.9 sec  |  TURBO50 DM-41L      |       115.7 sec  |  12 MHz DM-41L      |        73.7 sec  |  48 MHz DM-41L*     |        43.9 sec  |  12 MHz DM-41L*     |        10.7 sec  |  48 MHz HP-15CLE    |         2.1 sec  | DM-15L      |        51.7 sec  |  12 MHz DM-15L      |        12.6 sec  |  48 MHz HP-15C      |       258.9 sec  |
The times for the -41s were measured with the internal clock. The times for the -15s were taken manually and are therefore less accurate (+/-0.1 sec).
The DM-41L* data refer to an DM-41L with DM-15 firmware.
What wonders me is that the DM-41L is so much slower than the DM-15L. It's also strange, that the speed increase for the DM-41L from 12 MHz to 48 MHz is only 1.6x instead of 4x for the DM-15L.
May be there is some potential for optimisation in the DM-41L.

Here is the code I used:
Code:
# -------------------------------------------- # HEWLETT·PACKARD 15C Simulator program # Created with version 3.4.00 # -------------------------------------------- #T:JNX #D:Program calculates Jn(x) Store order n in Y and x in X. Program taken from the book "HP-41 Extended Functions Made Easy"  by Keith Jarett, Synthetix, 1983 #L-2:Bessel Function of first kind and order n #R0:order n #R1:Jn(x) #R2:Norm #R3:x #R4:Ji(x) #R5:Ji+1(x) #R6:Jn+1(x) #R7:2i # --------------------------------------------    000 {             }     001 {    42 21 12 } f LBL B    002 {       44  3 } STO 3    003 {       43 16 } g ABS    004 {           5 } 5    005 {          40 } +    006 {          34 } x↔y    007 {       44  0 } STO 0    008 {    43 30  8 } g TEST x<y    009 {          34 } x↔y    010 {       43 44 } g INT    011 {           4 } 4    012 {          20 } ×    013 {       44  7 } STO 7    014 {          15 } 1/x    015 {       44  2 } STO 2    016 {       44  4 } STO 4    017 {       44  5 } STO 5    018 {    42 21  0 } f LBL 0    019 {       45  5 } RCL 5    020 {          16 } CHS    021 {       45  7 } RCL 7    022 {       45  3 } RCL 3    023 {          10 } ÷    024 {       45  4 } RCL 4    025 {       44  5 } STO 5    026 {          20 } ×    027 {          40 } +    028 {       44  4 } STO 4    029 {       45  7 } RCL 7    030 {           4 } 4    031 {          10 } ÷    032 {       42 44 } f FRAC    033 {    43 30  0 } g TEST x≠0    034 {          10 } ÷    035 {    44 40  2 } STO + 2    036 {       45  0 } RCL 0    037 {           2 } 2    038 {    44 30  7 } STO − 7    039 {          20 } ×    040 {       45  7 } RCL 7    041 {    43 30  6 } g TEST x≠y    042 {       22  1 } GTO 1    043 {       45  4 } RCL 4    044 {       44  1 } STO 1    045 {       45  5 } RCL 5    046 {       44  6 } STO 6    047 {       45  7 } RCL 7    048 {    42 21  1 } f LBL 1    049 {    43 30  0 } g TEST x≠0    050 {       22  0 } GTO 0    051 {       45  4 } RCL 4    052 {    44 30  2 } STO − 2    053 {       45  2 } RCL 2    054 {    44 10  1 } STO ÷ 1    055 {    44 10  4 } STO ÷ 4    056 {    44 10  5 } STO ÷ 5    057 {    44 10  6 } STO ÷ 6    058 {       45  5 } RCL 5    059 {       45  4 } RCL 4    060 {       45  6 } RCL 6    061 {       45  1 } RCL 1    062 {       43 32 } g RTN # --------------------------------------------

EDIT:
Updated the table with the data of the HP-15C and the converted DM-41L
12-24-2015, 06:35 AM (This post was last modified: 12-24-2015 06:57 AM by HrastProgrammer.)
Post: #2
 HrastProgrammer Member Posts: 135 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
So, DM-41L running at 48MHz on LPC1115 (32-bit ARM RISC CPU) runs just slightly faster (73.7 vs. 87.6 sec) than the original HP-41CV while 15+ years ago I was able to emulate HP-41C/CV/CX which runs ~3x (HP-41X) and ~1.8x (HP-41E) faster than the original, all this on an ancient HP-48GX (4-bit "stone age" CPU at ~3.8MHz)!

The only logical explanation is that display refresh takes an enormous amount of time on DM-41L. Try to disable a goose - put some ALPHA text on the display at the start of the program and report the results ...

http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
12-24-2015, 12:12 PM
Post: #3
 Marcus von Cube Senior Member Posts: 745 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
(12-24-2015 06:35 AM)HrastProgrammer Wrote:  The only logical explanation is that display refresh takes an enormous amount of time on DM-41L. Try to disable a goose - put some ALPHA text on the display at the start of the program and report the results ...

I concur with your assumptions but displaying the goose alone doesn't help. I tried it with Xerxes' 8queens benchmark and got results in the same league.

There possibly is some logic involved to emulate the original speed in certain places, such as pause or catalog display. This might come in the way when not needed.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
12-24-2015, 12:49 PM
Post: #4
 Bernd Grubert Member Posts: 61 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
I did the benchmark on the DM-41L again with "VIEW X" at the beginnig of the program. The execution time decreased by approx. 3 sec (70.5 sec @ 48MHz). In my opinion, the small decrease indicates that there must be another mechanism, that slows down the DM-41L.
12-24-2015, 06:56 PM
Post: #5
 BarryMead Senior Member Posts: 350 Joined: Feb 2014
RE: Speed comparison Swissmicros / HP
It would be interesting to see the same timing tests on the original HP-15C in addition
to the HP-15CLE. I know that the LE is MUCH FASTER than the original, but I believe
the Swiss Micros is also quite a bit faster than the original HP-15C.

Does anyone on this forum have an original HP-15C that they could run this bencmark on?
12-25-2015, 06:48 AM
Post: #6
 DMaier Junior Member Posts: 34 Joined: Jan 2014
RE: Speed comparison Swissmicros / HP
(12-24-2015 06:56 PM)BarryMead Wrote:  Does anyone on this forum have an original HP-15C that they could run this bencmark on?

About 258.9s on an original 15C. (Merry Christmas.)
12-25-2015, 08:43 AM
Post: #7
 HrastProgrammer Member Posts: 135 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
Based on all above results, something is totally wrong with DM-41L implementation. 48MHz should run circles around the original HP-41C. DM-15L is much better in this regard ... 258.9s (original HP-15C) vs. 12.6s (DM-15L @ 48MHz) = 20 times faster (although, IMHO, with proper optimizations an 48MHz 32-bit RISC CPU should do much better than 20x).

http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
01-13-2016, 09:30 AM (This post was last modified: 01-13-2016 09:40 AM by Bernd Grubert.)
Post: #8
 Bernd Grubert Member Posts: 61 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
Here is another observation that may be related to the speed difference:
When I use the DM-15L (new version with metal domes) I sometimes (~every 10th to 20th) loose a keypress. The lost keypresses usually happens when I type fast. They cannot be reproduced and are not specific to certain keys. When I type slowly everything seems to be ok.

Mr. Steinmann assumed that this could be a hardware problem and sent me a replacement foil with the metal domes, but the problem persists. I have never had this kind of problem with the DM-41L.

It would be interesting to know, whether others have similar problems with the keyboard of the DM-15L. If this is the case the reasons for this may not lie in the hardware, but may be in the software implementation of the keypress detection.

Regards
Bernd
01-13-2016, 09:49 AM
Post: #9
 ElectroDuende Member Posts: 139 Joined: Jul 2014
RE: Speed comparison Swissmicros / HP
(01-13-2016 09:30 AM)Bernd Grubert Wrote:  Here is another observation that may be related to the speed difference:
When I use the DM-15L (new version with metal domes) I sometimes (~every 10th to 20th) loose a keypress. The lost keypresses usually happens when I type fast. They cannot be reproduced and are not specific to certain keys. When I type slowly everything seems to be ok.

Mr. Steinmann assumed that this could be a hardware problem and sent me a replacement foil with the metal domes, but the problem persists. I have never had this kind of problem with the DM-41L.

It would be interesting to know, whether others have similar problems with the keyboard of the DM-15L. If this is the case the reasons for this may not lie in the hardware, but may be in the software implementation of the keypress detection.

Regards
Bernd

A good way to test will be to flash your DM-41L with the DM-15L software and test if you have the problem...
01-13-2016, 11:21 AM
Post: #10
 Bernd Grubert Member Posts: 61 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
(01-13-2016 09:49 AM)ElectroDuende Wrote:  A good way to test will be to flash your DM-41L with the DM-15L software and test if you have the problem...

Thanks for the info. I didn't know that this is possible.
01-26-2016, 08:30 PM (This post was last modified: 01-26-2016 08:36 PM by Bernd Grubert.)
Post: #11
 Bernd Grubert Member Posts: 61 Joined: Dec 2013
RE: Speed comparison Swissmicros / HP
I have tried the 15L firmware on the DM-41L. The DM-41L with the other firmware is even a little bit faster than the DM-15L (see updated table in the first post).

Interestingly the keyboard problems appear on the modified DM-41L, too.
Has anyone else observed keyboard problems with the DM-15L, too?
 « Next Oldest | Next Newest »

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