Just for the fun of it...the savage benchmark

Discussion around the SwissMicros DM42 calculator
jfb9301
Posts: 21
Joined: Mon Dec 11, 2017 12:33 am

Re: Just for the fun of it...the savage benchmark

Post by jfb9301 »

Ok, so I have made some changes to my code, and I believe the core of it matches gsrbanks'. Due to differences in how we calculate accuracy, I understand how that is different. The differences in elapsed time is what I wish to resolve.

Un-plugged gsrbanks is at 14.08 sec, I am at 20.89
Plugged gsrbanks is 6.35, my run is done in 7.12 seconds

This is my current code

Code: Select all

00 { 67-Byte Prgm }
01▸LBL "SAVAGE"
02 RAD
03 2499
04 STO ST Y
05 TIME
06 →HR
07 STO 03
08 R↓
09 1
10▸LBL 01
11 ENTER
12 ×
13 SQRT
14 LN
15 E↑X
16 ATAN
17 TAN
18 1
19 +
20 DSE ST Y
21 GTO 01
22 STO 01
23 TIME
24 →HR
25 RCL- 03
26 3600
27 ×
28 RCL 01
29 2500
30 -
31 2500
32 ÷
33 DEG
34 END
The important part as I see it, is the calculational loop itself. Mine starts at line 10, gsrbanks' starts at line 11, but as near as I can tell, they are the same. which does not explain the fact that my calculator takes 48% longer to complete the un-plugged run, and almost more oddly only 12% longer on the plugged-in run.
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: Just for the fun of it...the savage benchmark

Post by dlachieze »

One parameter influencing a program execution time on the DM42 is the value of the virtual variable RefLCD which controls how the screen is refreshed.

On my DM42 v3.1, running the program of grsbanks with the default value (7) takes 20.59s, however with RefLCD set to 0 (no refresh) it takes only 13.89s
DM42: 00425 - DM41X: β00066 - WP43: 00042
jfb9301
Posts: 21
Joined: Mon Dec 11, 2017 12:33 am

Re: Just for the fun of it...the savage benchmark

Post by jfb9301 »

That did it.....

12.84 sec un-plugged, 6.1 plugged. Now I'm not sure why I'm faster :D.

This was with RefLCD = 0

I just updated my code to set RefLCD to 0 at the beginning, and reset it to 7 on exit.

Code: Select all

00 { 84-Byte Prgm }
01▸LBL "SAVAGE"
02 "RefLCD"
03 ASTO 02
04 CLX
05 STO IND 02
06 RAD
07 2499
08 STO ST Y
09 TIME
10 →HR
11 STO 03
12 R↓
13 1
14▸LBL 01
15 ENTER
16 ×
17 SQRT
18 LN
19 E↑X
20 ATAN
21 TAN
22 1
23 +
24 DSE ST Y
25 GTO 01
26 STO 01
27 TIME
28 →HR
29 RCL- 03
30 3600
31 ×
32 RCL 01
33 2500
34 -
35 2500
36 ÷
37 DEG
38 7
39 STO IND 02
40 R↓
41 END
Last edited by jfb9301 on Tue Dec 26, 2017 1:40 pm, edited 1 time in total.
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Just for the fun of it...the savage benchmark

Post by keithdalby »

jfb9301 wrote:
Tue Dec 26, 2017 1:15 pm
Now I'm not sure why I'm faster
How much of an [e/a]ffect* does manufacturer tolerance have on modern electronic microprocessors?

*Given the Christmas Day conversation about grammar, I should probably make it clear that my English language skills are limited. But Feynman couldn't spell either, so I've made my peace with that.
jfb9301
Posts: 21
Joined: Mon Dec 11, 2017 12:33 am

Re: Just for the fun of it...the savage benchmark

Post by jfb9301 »

It doesn't. :)

These are meaningless, arbitrary numbers that only test a small subset of the capabilities of the calculator.

That said, the reason why I am pursuing the difference is that with two differently written programs that execute the same instruction should reproduce similar results. Knowing why there is a difference helps me to understand how the device works and how better to write programs. If speed is an issue with a program, then obviously RefLCD at 0 is a priority. Consider the alternative, where size of program is an issue (as it was for most HP calculators), minimizing code is a priority.

Mucking about with programs like this is how I learn to write better and more complex programs.
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Just for the fun of it...the savage benchmark

Post by Thomas Okken »

keithdalby wrote:
Tue Dec 26, 2017 1:30 pm
jfb9301 wrote:
Tue Dec 26, 2017 1:15 pm
Now I'm not sure why I'm faster
How much of an [e/a]ffect* does manufacturer tolerance have on modern electronic microprocessors?

*Given the Christmas Day conversation about grammar, I should probably make it clear that my English language skills are limited. But Feynman couldn't spell either, so I've made my peace with that.
Telling students not to use one of the most common meanings of the verb "can," not being sure about the difference between the nouns "effect" and "affect"... What do you teach? It better not be English. :lol:
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Just for the fun of it...the savage benchmark

Post by keithdalby »

Thomas Okken wrote:
Tue Dec 26, 2017 2:36 pm
... What do you teach? It better not be English. :lol:
"Every teacher is a teacher of English," we are told in England, but breathe a sigh of relief, the future generations are mostly spared my linguistic idiosyncrasies. Mostly.
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Just for the fun of it...the savage benchmark

Post by Walter »

keithdalby wrote:
Tue Dec 26, 2017 3:07 pm
Thomas Okken wrote:
Tue Dec 26, 2017 2:36 pm
... What do you teach? It better not be English. :lol:
"Every teacher is a teacher of English," we are told in England, but breathe a sigh of relief, the future generations are mostly spared my linguistic idiosyncrasies. Mostly.
Most of them wouldn't be any problem if we were talking here but - alas - we're all writing on this forum (and on others as well ... ummh ... wrong - and even that would be no problem if we'd at least read what we've written ourselves and correct what's wrong).
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Post Reply