[HP35s] Benchmark of some operations - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: [HP35s] Benchmark of some operations (/thread-12414.html) [HP35s] Benchmark of some operations - fred_76 - 02-13-2019 10:20 AM Hello, Here is a benchmark of some of the HP35s operations/functions. It shows the execution time in milliseconds. Code: ``` Function             Time (ms) 1                         28.1 1.1                       37.4 1.11                      40.5 1.111                     43.7 12                        31.2 123                       34.3 1234                      37.5 -                         13.7 *                         16.3 /                         18.3 +                         13.8 +/-                        8.4 1/x                       14.7 CLx                        2.3 cos                       37.8 DES                         31 ENTER                      4.4 GTO                        2.8 ISG                       29.4 LASTx                      4.6 LBL N                      1.6 OR                         0.7 pi                         9.7 R^                         4.3 RCL x                      5.1 RCL+ D                     9.7 RCL-D                      9.7 REGY                      31.7 RMDR                      10.3 Rv                         4.3 SF                         1.8 sin                       21.9 sqrt                      14.3 STO x                      1.9 STOx U                    11.7 tan                         28 x<=0?                      6.5 x<>A                       4.4 x<>y                       3.2 x<0?                       3.7 x=0?                         3 x>=y?                      3.5 x²                          11 XEQ                        6.8``` You will notice that the more digits a number has, the longer it takes for execution. Take these figures as indicative only ! Fred RE: [HP35s] Benchmark of some operations - Leviset - 02-13-2019 10:57 AM Out of interest - How are you measuring these? RE: [HP35s] Benchmark of some operations - fred_76 - 02-13-2019 12:02 PM (02-13-2019 10:57 AM)Leviset Wrote:  Out of interest - How are you measuring these? I programmed a loop, and first manually measure the time taken by the empty loop (t0). I do this manually as the HP35s does'nt have internal timer. The code is like that, nnn being the number of iterations (usually 1000) : Code: ``` L001 LBL L L002 nnn L003 STO I L004 (set of) instruction(s) to test L005 DSE I L006 GTO L004 L007 RTN``` Then I just have to insert the instruction(s) to test in line 4, restart the test program and measure the time t1. The time per (set of) instruction(s) is then 1000*(t1-t0)/nnn in ms. I repeat this several times (especialy when t1-t0 < 10s) and take the shortest time measured. It is quite precise, I calculated the time for the calculation of the prime number 99 999 999 977 using the algorithm shown here and found a theoretical value of 14'40", to be compared to the real time of 14'37". Fred