Post Reply 
How to time a DM42 program?
09-23-2024, 09:12 PM
Post: #1
How to time a DM42 program?
I'd like to run benchmark tests between a DM42 and a DM42n.
In order to do this, I'd like to time the benchmark programatically rather than rely on my shaky hands to operate a stopwatch. Is there a way to do that? Here's how it's done in ANSI BASIC

Code:
T=TIMER
<do program  here>
T=TIMER-T
PRINT "Runtime:";T;"seconds"

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
09-23-2024, 09:47 PM (This post was last modified: 09-23-2024 10:46 PM by Steve Simpkin.)
Post: #2
RE: How to time a DM42 program?
A program like the following *may* work.
Replace step 04 with a XEQ to the program you want to time. I used PSE as a test for a 1 second execution time.

The resulting execution time with be in the format HH.MMSSss so the resolution is .01 seconds

00 { 15-Byte Prgm }
01▸LBL "TMG"
02 TIME
03 STO 00
04 PSE
05 TIME
06 RCL 00
07 HMS-
08 END

Edit: Fixed step 07.
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2024, 09:51 PM (This post was last modified: 09-23-2024 09:52 PM by Didier Lachieze.)
Post: #3
RE: How to time a DM42 program?
At step 07, HMS- would likely give a better result than -
Find all posts by this user
Quote this message in a reply
09-23-2024, 10:39 PM
Post: #4
RE: How to time a DM42 program?
(09-23-2024 09:51 PM)Didier Lachieze Wrote:  At step 07, HMS- would likely give a better result than -

Yes, I missed that. Thank you.

00 { 15-Byte Prgm }
01▸LBL "TMG"
02 TIME
03 STO 00
04 PSE
05 TIME
06 RCL 00
07 HMS-
08 END
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2024, 10:47 PM
Post: #5
RE: How to time a DM42 program?
This is what I use.
Name of routine in ALPHA, returns time in seconds.

Code:
00 { 37-Byte Prgm }
01▸LBL "TVAL"
02 LSTO "T0"
03 ASTO ST L
04 CLX
05 TIME
06 X<> "T0"
07 XEQ IND ST L
08 TIME
09 RCL "T0"
10 HMS-
11 →HR
12 3600
13 ×
14 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
09-24-2024, 10:27 PM
Post: #6
RE: How to time a DM42 program?
Thank you to all who answered! I am now able to time programs automatically. I'll put this to good use when my DM42n arrives. Actually, the DM42 comes up with an index of over 1500 in the Calculator Performance Index benchmark which is pretty darn good.

https://www.thimet.de/CalcCollection/Cal...mance.html

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 




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