The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

Loop of + benchmark now in Articles section
Message #1 Posted by gene wright on 2 June 2010, 2:59 p.m.

New Benchmark

Enjoy! Gene

      
Re: Loop of + benchmark now in Articles section
Message #2 Posted by Glenn Shields on 2 June 2010, 4:01 p.m.,
in response to message #1 by gene wright

It's interesting that the 35s is faster doing register arithmetic (STO + Z) than simply +ing on the stack. Is that because dropping the stack each time uses more steps? regards, Glenn

            
Re: Loop of + benchmark now in Articles section
Message #3 Posted by gene wright on 2 June 2010, 4:25 p.m.,
in response to message #2 by Glenn Shields

Maybe it is due to the different types that might be on the stack. Is it a real? Is it a complex number? Each + might require that to be checked, whereas a STO+ operation might not. Guessing.

      
Re: Loop of + benchmark now in Articles section
Message #4 Posted by Gerson W. Barbosa on 3 June 2010, 9:01 a.m.,
in response to message #1 by gene wright

No 49G?

HP 49G
Count: 12,351
Code:  1. << DO 1. + UNTIL 0. END >>

HP 49G Count: 11,041 Code: << WHILE 1. REPEAT 1. + END >>

Gerson.

            
Re: Loop of + benchmark now in Articles section
Message #5 Posted by Tim Wessman on 3 June 2010, 11:08 a.m.,
in response to message #4 by Gerson W. Barbosa

I think everyone tries to forget that unit for a variety of reasons. . . :-D

TW

            
Re: Loop of + benchmark now in Articles section
Message #6 Posted by Paul Dale on 4 June 2010, 2:59 a.m.,
in response to message #4 by Gerson W. Barbosa

What about in integers?

#1 << DO #1 + UNTIL 0. END >>

My 49 died a while back :-( So did my 48sx :-( And no batteries for my 28s and a broken battery door to boot :-(

- Pauli

                  
Re: Loop of + benchmark now in Articles section
Message #7 Posted by John Keith on 4 June 2010, 9:51 a.m.,
in response to message #6 by Paul Dale

For my 50g, I get 19692 (average of 3 runs).


John

                  
Re: Loop of + benchmark now in Articles section
Message #8 Posted by Gerson W. Barbosa on 4 June 2010, 2:06 p.m.,
in response to message #6 by Paul Dale

Quote:
What about in integers?

#1 << DO #1 + UNTIL 0. END >>

#7164d (WS = 16)

#7130d (WS = 64)

Gerson.
      
Re: Loop of + benchmark now in Articles section
Message #9 Posted by Mark Storkamp on 4 June 2010, 9:39 p.m.,
in response to message #1 by gene wright

16C using increment

HP-16C
Count: 340
With 0 in I
Code: Lbl A, Isz, Gto A
            
Re: Loop of + benchmark now in Articles section
Message #10 Posted by Gjermund Skailand on 6 June 2010, 5:54 p.m.,
in response to message #9 by Mark Storkamp

Hp 50G 12,000,000
User-rplfunction 'SUM(I=1, 12000000,1)' interpreted by custom library in HPGCC. The library evaluates functions, sums and numerical integrals from the Equation Writer in double precision for most real functions.

      
Re: Loop of + benchmark now in Articles section
Message #11 Posted by Frido Bohn on 8 June 2010, 5:40 a.m.,
in response to message #1 by gene wright

Hello Gene,

congrats, a real great compilation of that simple benchmark across several generations of calculators!

However, for the great HP41C/CV/CX one benchmark is missing: MCODE
In the book "HP41 MCODE for Beginners" of Ken Emery, published 1985, a 20-step machine code for this 1+ addition algorithm is presented (pages 50-52) which I wont list here.
To make things short:
Count: ~130 000
This is about 100-fold of FOCAL or Synthetic programs!

The 41 was, is and remains amazing


[ Return to Index | Top of Index ]

Go back to the main exhibit hall