Post Reply 
HP Prime: a student's view
08-31-2021, 10:42 AM (This post was last modified: 08-31-2021 10:51 AM by toml_12953.)
Post: #8
RE: HP Prime: a student's view
(08-31-2021 05:38 AM)Thomas_Sch Wrote:  
(08-30-2021 04:50 PM)toml_12953 Wrote:  
Code:
 ...
t=(eval("ticks()")-t)/1000
print("Index: {0:.2f}".format(34/t*loops))

just to understand better, where it the
Code:
34/t
coming from?
At http://thimet.de/CalcCollection/CalcPerformance.html i can't find this.

Measurement
The evaluation program (see below) performs 20 additions and substractions, 10 multiplications and divisions, 2 square roots, a sine and a logarithm, in total 34 operations. This is assumed to be a "representative" set of operations commonly used in a program. (In fact there are some additional substractions needed for the loop counter but those are not considered.)

The run time T of the above procedure is measured. If it is below 5 sec or so an outer loop is added to increase measurement accuracy.
The final result of the calculation should be 0.264577 provided degrees are used and log() returns the logarithm base 10.
If log() is base e then the result is 0.325915.
If log() is base e and radians are being used the result is 0.880982.
If log() is base e and the sine is replaced by exp() the result is 1.175412.

The performance index is calculated as "representative operations per second":

P = 34/T

My note: The above calculation of P is for ONE loop. You have to multiply P by the number of loops to get a figure in line with the published table.

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


Messages In This Thread
HP Prime: a student's view - Liam Hays - 08-30-2021, 01:11 AM
RE: HP Prime: a student's view - toml_12953 - 08-31-2021 10:42 AM
RE: HP Prime: a student's view - Liam Hays - 08-31-2021, 01:30 AM
RE: HP Prime: a student's view - parisse - 08-31-2021, 07:30 PM
RE: HP Prime: a student's view - Liam Hays - 08-31-2021, 11:20 PM
RE: HP Prime: a student's view - jte - 09-01-2021, 10:43 PM
RE: HP Prime: a student's view - Liam Hays - 09-03-2021, 01:31 AM
RE: HP Prime: a student's view - jte - 09-05-2021, 03:44 PM
RE: HP Prime: a student's view - jte - 09-05-2021, 06:16 AM
RE: HP Prime: a student's view - pinkman - 09-03-2021, 09:30 PM
RE: HP Prime: a student's view - Liam Hays - 09-04-2021, 01:30 AM
RE: HP Prime: a student's view - Liam Hays - 09-04-2021, 04:49 PM
RE: HP Prime: a student's view - ijabbott - 09-04-2021, 08:44 AM



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