The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

Brute force addition speed test - various models - results?
Message #1 Posted by Gene Wright on 28 May 2010, 10:26 a.m.

Xerxes has done a great job with the complex speed test N-queens problem for various calculators as detailed in his Benchmark article (and Hi Xerxes...I've found your posts on a Casio board as well).

I'd like to get a list of speeds for a much simpler program, that ONLY goes after one thing: addition.

LBL 01
+
GTO 01
where the stack contains 0 1 1 1 on 4 level machines. In other words, start with 0 and do repeated additions of 1 for 60 seconds. What is the result?

I know Xerxes' test checks many other things, but how do they stack up with this?

Please post:

The machine used
Your count after 60 seconds
Your program code.

I'll start:

Machine: HP 12c+ Count: 78640 Code: + GTO 01

Machine: HP 12c platinum Count: 1386 Code: + GTO 001

Machine: HP 30b Count: 72517 Code: LBL 00 + GOTO 00 (as first program in memory)

Machine: HP 67 Count: 226 Code: LBL 1 + GTO 1

Machine: HP 41c Count: 1063 Code: LBL 01 + GTO 01

Edited: 28 May 2010, 10:26 a.m.

      
Re: Brute force addition speed test - various models - results?
Message #2 Posted by Norman Dziedzic on 28 May 2010, 10:41 a.m.,
in response to message #1 by Gene Wright

Machine: HP 35s
  Count: 3652
   Code: LBL B, +, GTO B001

Count: 5504 Stack: 1, 1, 1, 1 Z: 0 Code: B001 LBL B B002 STO+ Z B003 GTO B002 B004 RTN

Edited: 28 May 2010, 2:23 p.m.

      
Re: Brute force addition speed test - various models - results?
Message #3 Posted by Bart (UK) on 28 May 2010, 10:54 a.m.,
in response to message #1 by Gene Wright

Machine: HP 33s
Count: 10097
Code: LBL A + GTO A

Machine: HP 50G (normal speed)
Count: 5510
Code: << 1 + A >> stored in A, start with 1 on stack line 1:

Are we doing non-HP / non-RPN too?
Machine: Sharp PC-1251
Count: 1277
Code: 1: A=A+1 2: GOTO 1 ; start with 0 stored in A.

Machine: Elektronika MK-61
Count: 106
Code: + GSB 00
(Tapping + key by hand: 133)

Edited: 28 May 2010, 1:43 p.m.

            
Re: Brute force addition speed test - various models - results?
Message #4 Posted by Tim Wessman on 28 May 2010, 2:53 p.m.,
in response to message #3 by Bart (UK)

Anyone testing on a 48gII/49g+/50g, remember to be in approximate mode. Otherwise you may be doing exact symbolic adding.

50g: 30025
<< WHILE 1. REPEAT 1. + END >>

sysrpl: 64023
:: BEGIN ?ATTNQUIT %1+ AGAIN ;

TW

Edited: 28 May 2010, 2:56 p.m.

                  
Re: Brute force addition speed test - various models - results?
Message #5 Posted by Bart (UK) on 28 May 2010, 5:59 p.m.,
in response to message #4 by Tim Wessman

I used the <<1 + A>> stored in A method to as closely as possible emulate Gene's RPN routine. It did not seem to make much difference in Exact or Approximate. I also stick to User RPL without speed enhancement as I think that's what most users use.

Edit: of course in hindsight the <<1 + A>> is not fair as it exits and re-enters the program continously, so a loop is indeed better.

Edited: 28 May 2010, 6:04 p.m.

                        
Re: Brute force addition speed test - various models - results?
Message #6 Posted by Tim Wessman on 28 May 2010, 7:34 p.m.,
in response to message #5 by Bart (UK)

Yeah, that global variable evaluation will slow things down quite a bit.

TW

      
Re: Brute force addition speed test - various models - results?
Message #7 Posted by Ken Shaw on 28 May 2010, 11:23 a.m.,
in response to message #1 by Gene Wright

Machine: original 12c (mfg. 1985)
Count: 500
Code: +; GTO 01
      
Re: Brute force addition speed test - various models - results?
Message #8 Posted by Ken Shaw on 28 May 2010, 11:30 a.m.,
in response to message #1 by Gene Wright

Machine: 15c (mfg. 1983)
Count: 297
Code: LBL A; +; GTO A
      
Re: Brute force addition speed test - various models - results?
Message #9 Posted by Don Shepherd on 28 May 2010, 11:51 a.m.,
in response to message #1 by Gene Wright

All right, I'm game. How about the granddaddy of them all:

Machine:  HP-65
Count:  578
Code:  Lbl 1, +, Goto 1
      
Re: Brute force addition speed test - various models - results?
Message #10 Posted by Thomas Okken on 28 May 2010, 12:09 p.m.,
in response to message #1 by Gene Wright

HP-25: 512

01 +
02 GTO 01

HP-42S: 2,115
Free42 on ThinkPad T61: 88,939,215 :-)

01 LBL 00
02 +
03 GTO 00

HP-48G: 10,726

<< WHILE 1 REPEAT 1 + END >>
            
Re: Brute force addition speed test - various models - results?
Message #11 Posted by Thomas Okken on 28 May 2010, 10:45 p.m.,
in response to message #10 by Thomas Okken

HP-42S with "goose" disabled: 3067

01 CLLCD
02 LBL 00
03 +
04 GTO 00

Gene, have you tried this on the 41C? The cost of moving the goose is probably less on the 41C than on the 42S, but it might still be significant...

      
Re: Brute force addition speed test - various models - results?
Message #12 Posted by Don Shepherd on 28 May 2010, 12:10 p.m.,
in response to message #1 by Gene Wright

Machine: 16c
Count:  245
Code:  Lbl 1, +, Goto 1

Machine: 11c Count: 353 Code: Lbl 1, +, Goto 1

Machine: 12c plat 25th anniv. Count: 1435 Code: +, Goto 001

      
Re: Brute force addition speed test - various models - results?
Message #13 Posted by Norman Dziedzic on 28 May 2010, 1:07 p.m.,
in response to message #1 by Gene Wright

Machine: HP 48gii (Original 3 batteries, NO USB)
  Count: 3036
   Code: << WHILE 1 REPEAT 1 + END >>

Count: 3088 // Exact Mode Count: 26,439 // Approx Mode Code: << WHILE 1 REPEAT 1. + END >>

Count: 4296 Code: << TICKS 8192 60 * + << -> t << DO 1. + UNTIL TICKS t >= END >> >> EVAL >> --------------------------------- Machine: 48GX Count: 11636 Code: << WHILE 1 REPEAT 1 + END >>

Edited: 28 May 2010, 3:17 p.m. after one or more responses were posted

            
Re: Brute force addition speed test - various models - results?
Message #14 Posted by Tim Wessman on 28 May 2010, 2:55 p.m.,
in response to message #13 by Norman Dziedzic

Those have to be in exact mode. . .

TW

                  
Re: Brute force addition speed test - various models - results?
Message #15 Posted by Norman Dziedzic on 28 May 2010, 3:18 p.m.,
in response to message #14 by Tim Wessman

Guilty as charged. Interesting that there was a little difference between adding 1 and 1. but both were still in exact mode (or just could have been my variation in pressing the cancel key...

Edited above for Approx Mode.

      
Re: Brute force addition speed test - various models - results?
Message #16 Posted by Raymund Heuvel on 28 May 2010, 1:38 p.m.,
in response to message #1 by Gene Wright

HP-71B

10 DESTROY A @ A=0
20 ON TIMER #1,60 GOTO 40
30 A=A+1 @ GOTO 30
40 DISP A

Result: 4320

BR Ray

            
Re: Brute force addition speed test - various models - results?
Message #17 Posted by Israel Otero on 28 May 2010, 2:22 p.m.,
in response to message #16 by Raymund Heuvel

Machine: HP-38C Financial 1982 Singapore Soldered construction

Code:
01 +
02 GTO 01
1 ENTER^ ENTER^ ENTER^ g GTO 00 R/S

Count: 387

Edited: 29 May 2010, 12:03 a.m.

            
Re: Brute force addition speed test - various models - results?
Message #18 Posted by Don Shepherd on 28 May 2010, 2:47 p.m.,
in response to message #16 by Raymund Heuvel

Raymund, I imagine there is some overhead in setting (and especially checking) a timer. It would be interesting to not do the timer and just manually interrupt it at 60 seconds and see what the count is.

                  
Re: Brute force addition speed test - various models - results?
Message #19 Posted by Raymund Heuvel on 28 May 2010, 7:08 p.m.,
in response to message #18 by Don Shepherd

Hi Don,

about 10 times hand stopped: Average := 4295
about 10 times hand stopped: Average := 4303 (2 minutes / 2)
Program:
10 A=A+1 @ GOTO 10
A=0 [RUN]

Variant (all statements in direct mode):
about 10 times hand stopped: Average := 3136
about 10 times hand stopped: Average := 3131 (2 minutes / 2)
Immediate code:
A=0
FOR T=1 TO 999999 @ A=A+1 @ NEXT T

I think the timer is more accurate. According to the IDS, it generates an interrupt.
It is not a polling timer!

BR
Ray
PS, See also this approach to determine the best guess.
Could be changed for the basic variant of course ....

      
Re: Brute force addition speed test - various models - results?
Message #20 Posted by Juergen Keller on 28 May 2010, 2:49 p.m.,
in response to message #1 by Gene Wright

Machine: HP-41CY Turbo
Count: 1982
Code: LBL 00, +, GTO 00

Machine: HP-9100B
Count: 47394
Code: +, GO TO, 0, 0

            
Re: Brute force addition speed test - various models - results?
Message #21 Posted by Israel Otero on 28 May 2010, 3:37 p.m.,
in response to message #20 by Juergen Keller

Hi: The oldest computer I have and my inspiration for my love for HP Calcs

The machine that started it all:

HP 9100A SERIAL NUMBER 816-01071 (1971?)

Count: 49391

Code:
+
GO TO 00

After given to me by an HP Service Engineer in 1982 it still works ok

Edited: 29 May 2010, 12:10 a.m.

      
Re: Brute force addition speed test - various models - results?
Message #22 Posted by David Hayden on 28 May 2010, 3:22 p.m.,
in response to message #1 by Gene Wright

Machine: HP 48Gii (old version)
Count: 28160
Code: 1. << DO 1. + UNTIL 0. END >> EVAL

Edited: 28 May 2010, 3:24 p.m.

      
Re: Brute force addition speed test - various models - results?
Message #23 Posted by Thomas Falk on 28 May 2010, 4:26 p.m.,
in response to message #1 by Gene Wright

Machine: HP 9810A
Count: 15335

Code:

0000--LBL---51
0001-- 1 ---01
0002-- + ---33
0003--GTO---44
0004-- 1 ---01
0005--END---46

Greetings,

Thomas

Edited: 28 May 2010, 4:27 p.m.

            
Re: Brute force addition speed test - various models - results?
Message #24 Posted by Katie Wasserman on 28 May 2010, 8:39 p.m.,
in response to message #23 by Thomas Falk

Machine: 9815A/S

Count: 31,156

0000 LBL 
---- A
0002 1
0003 +
0004 GTO    A

-Katie

Edited: 28 May 2010, 8:39 p.m.

      
Re: Brute force addition speed test - various models - results?
Message #25 Posted by Paul Dale on 28 May 2010, 6:19 p.m.,
in response to message #1 by Gene Wright

First some results:

HP 16c: 293 (float 4)
HP 16c: 230 (decimal, wsize 16, 2-complement)
HP 34c: 259 (standard program)
HP 34c: 277 (I program)

The first three used this program:

    LBL A
    +
    GTO A

For the fourth, the 34c used:

    LBL A
    +
    GTO f I

With -1 stored in I.

- Pauli

            
Re: Brute force addition speed test - various models - results?
Message #26 Posted by Paul Dale on 29 May 2010, 7:00 p.m.,
in response to message #25 by Paul Dale

Quote:
HP 16c: 293 (float 4)
HP 16c: 230 (decimal, wsize 16, 2-complement)

The thing I find interesting here is that the integer version of the code is substantially slower than the floating point equivalent. That really doesn't make a lot of sense but it does indicate how much effort was likely put into the floating point implementation.

- Pauli

      
Re: Brute force addition speed test - various models - results?
Message #27 Posted by Scott Newell on 28 May 2010, 10:22 p.m.,
in response to message #1 by Gene Wright

10C: 514
30B: 75487
30B: 222578
48SX: 7352
35S: 3631
12C+: oops, my current firmware isn't programmable
20S: 4170

Edited: 28 May 2010, 10:22 p.m.

            
Re: Brute force addition speed test - various models - results?
Message #28 Posted by Gene Wright on 29 May 2010, 8:28 a.m.,
in response to message #27 by Scott Newell

Hey scott.

Tell me the program code you used. I'm not posting a 222,578 result for the 30b unless you tell me how. :-)

                  
Re: Brute force addition speed test - various models - results?
Message #29 Posted by Scott Newell on 29 May 2010, 10:32 a.m.,
in response to message #28 by Gene Wright

Same code, TSYS on.

                        
Re: Brute force addition speed test - various models - results?
Message #30 Posted by Paul Dale on 29 May 2010, 6:50 p.m.,
in response to message #29 by Scott Newell

What is TSYS?

- Pauli

                              
Re: Brute force addition speed test - various models - results?
Message #31 Posted by Gene Wright on 29 May 2010, 6:59 p.m.,
in response to message #30 by Paul Dale

Test SYstem.

I believe it runs the 30b full blast. Eats batteries VERY quickly, but as Scott has shown, it really is fast! Wow.

      
Re: Brute force addition speed test - various models - results?
Message #32 Posted by Israel Otero on 28 May 2010, 11:56 p.m.,
in response to message #1 by Gene Wright

Hi (from Puerto Rico)

Machine: HP-75C (1982)

Count: 21717

Code:
10 A=0
20 A=A+1 @ GOTO 20
30 END

I will love to know how an HP9825 will score, that machine was really fast.

Machine: Psion Organiser II CM (1997)

Count: 10949

Code:
LOCAL a
a=1
DO
a=a+1
UNTIL KEY$="S"
PRINT a
GET

Greetings to all out there!

Edited: 29 May 2010, 12:34 a.m.

      
Re: Brute force addition speed test - various models - results?
Message #33 Posted by Xerxes on 29 May 2010, 1:03 p.m.,
in response to message #1 by Gene Wright

Thank you Gene, your test is surely better suited for a quick speed check than mine. ;-)

My first result:

Machine: FX-603P
Count: 7240
Code: AC 1 + + LBL 0 = GOTO 0
            
Re: Brute force addition speed test - various models - results?
Message #34 Posted by Gene Wright on 29 May 2010, 1:09 p.m.,
in response to message #33 by Xerxes

No problem.

And, I certainly agree that YOUR test is much more suited for an all-around speed impression. This test really does nothing other than add and loop!

      
Re: Brute force addition speed test - various models - results?
Message #35 Posted by Steve Simpkin on 29 May 2010, 1:37 p.m.,
in response to message #1 by Gene Wright

Machine: 48GX (m48+ emulator running on iPod Touch-2nd Gen, Authentic Speed Off)
Count: 54990
Code: << WHILE 1 REPEAT 1 + END >>

      
Re: Brute force addition speed test - various models - results?
Message #36 Posted by Scott Newell on 29 May 2010, 3:26 p.m.,
in response to message #1 by Gene Wright

12C+, custom firmware: 10,794,647
   do
   {
      ++x;
   } while ((((*(unsigned long int*)PIOC_PDSR) & c_mask)==c_mask));

I don't remember what I had the clock rate set to...might be able to improve this a bit.

            
Re: Brute force addition speed test - various models - results?
Message #37 Posted by Scott Newell on 29 May 2010, 4:42 p.m.,
in response to message #36 by Scott Newell

12C+, custom (integer) firmware running from flash, overclocked to 48.75 MHz : 261,602,459
      
Re: Brute force addition speed test - various models - results?
Message #38 Posted by Israel Otero on 31 May 2010, 11:47 a.m.,
in response to message #1 by Gene Wright

Greetings from Puerto Rico

Gene

Is amazing that the two machines that were my inspiration for loving computational instruments from Hewlett-Packard are still shining regardless of their age.

Those are the HP-9100 and the HP-9825.

Thank you very much for doing this.

      
Re: Brute force addition speed test - various models - results?
Message #39 Posted by Marcus von Cube, Germany on 3 June 2010, 8:11 a.m.,
in response to message #1 by Gene Wright

iPod touch 32G (recent model) with Free42
count: 7,321,760

LBL 00 + GTO 00

Stack: 0 1 1 1

      
Re: Brute force addition speed test - various models - results?
Message #40 Posted by Maarten Ambaum (Reading, UK) on 3 June 2010, 9:15 a.m.,
in response to message #1 by Gene Wright

35s on low batteries: 1733 Does the machine automatically reduce clock count (apparently by a factor 2) to save on power? That would be quite neat.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall