New addition speed test (updated with results as of 5pm CDT 20100530) ...add machines / methods not yet included..includ



#37

Presently in order from fastest to slowest.

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

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.

=============================================
HP-12C+, Scott’s custom integer firmware, overclocked to 48.75 MHz
Count: 261,602,459
Code: Unspecified

HP-12C+, Scott’s custom firmware
Count: 10,794,647
Code:
Do { ++x; } while ((((*(unsigned long int*)PIOC_PDSR) & c_mask)==c_mask));

HP 30b with TSTSYS ON
Count: 222,578
Code: LBL 00 + GOTO 00
(as first program in memory)

FX-9860G SD Fast Mode
Count: 206,250
Code: 0->A : Lbl 0 : A+1->A : Goto 0

HP 50g (SysRPL bint)
Count: 124,445
Code: !NO CODE !RPL :: ZERO BEGIN #1+ GETTOUCH UNTIL DROP ; @

FX-9860G SD
Count: 97,950
Code: 0->A : Lbl 0 : A+1->A : Goto 0

HP 12c+
Count: 78,640
Code: + GTO 01

HP 30b
Count: 72,517
Code: LBL 00 + GOTO 00
(as first program in memory)

HP 9825 B
Count: 59,568
Code: 0->A; "start"; A+1->A; gto "start"; end

Casio fx-9860G Slim
Count: 55,924
Code: 0->A Lbl 0 A+1->A Goto 0

HP 50g (SysRPL floating point)
Count: 56,994
Code: !NO CODE !RPL :: BEGIN %1+ GETTOUCH UNTIL DROP ; @

HP-9100A SERIAL NUMBER 816-01071 (1971?)
Count: 49,391
Code: +, GO TO 00

HP 9815S
Count: 47,592
Code: 000 + 001 GOTO 000

HP-9100B
Count: 47,394
Code: +, GO TO, 0, 0

HP-71B Forth Xerxes:
COUNT: 46,575
Code:
Forth
: XERXES 1 SWAP 0 DO 1+ LOOP ;
46575 XERXES DROP
BYE

HP 9815A/S
Count: 31,156
Code; LBL, A, 1, +, GTO A

HP 48Gii Exact mode (old version)
Count: 28,160
Code: 1. << DO 1. + UNTIL 0. END >> EVAL

HP 48gII
Count: 26,439 // Approx Mode
Code: << WHILE 1 REPEAT 1. + END >>

HP 85
Count: 23,605
Code: 10 Let A=0; 20 Let A=A+1; 30 goto 20; 40 END

HP-75C (1982)
Count: 21,717
Code:&#8232;10 A=0&#8232;20 A=A+1 @ GOTO 20&#8232;30 END

HP 9810A
Count: 15,355
Code LBL, 1, +, GTO, 1

TI-84 Silver Edition
Count: 13,838
Program: Lbl 1:A+1->A: Goto 1

HP 48GX
Count: 11,636
Code: << WHILE 1 REPEAT 1 + END >>

Psion Organiser II CM (1997)
Count: 10,949
Code:&#8232;LOCAL a&#8232;a=1&#8232;DO&#8232;a=a+1&#8232;UNTIL KEY$="S"&#8232;PRINT a&#8232;GET

HP-48G
Count: 10,726
Code: << WHILE 1 REPEAT 1 + END >>

HP 33s
Count: 10,097
Code: LBL A + GTO A

TI-89 Titanium
Count: 9,339
Program: aa():Prgm:Lbl b:a+1->a:Goto 1: EndPrgm

TI-83
Count: 8,106
Code: LBL B, A+1>>A, goto B

HP-48SX
Count: 7,352
Code: Unknown

FX-603P
Count: 7,240
Code: AC 1 + + LBL 0 = GOTO 0

HP-42s FAST MODE S/N 2849A with goose disabled
Count: 6,485
Code: CLLCD LBL 01 + GTO 01

HP-32s
Count: 5,973
Code: LBL A + GTO A

TI-92
Count: 5,686
Code: 0->a Lbl aa a+1->a Goto aa

HP-28S
Count: 5,677
Code: HOME 1 << WHILE 1 REPEAT 1 + END >> EVAL

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

HP 35s
Count: 5,504
Code: B001 LBL B B002 STO+ Z B003 GTO B002, with Z initialized to 0

PC-1247
Count: 5180
Code: 1:A=A+1:GOTO1

HP 20S
Count: 4,837
Code: LBL A, +, GTO A

HP-32sii
Count: 4,715
Code: LBL A, +, GTO A

HP-42s FAST MODE S/N 2849A
Count: 4,419
Code: LBL 01 + GTO 01

HP-71B
Count: 4,320
Code:

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

HP 48gii (Original 3 batteries, NO USB)
Count: 4,296
Code: << TICKS 8192 60 * + << -> t << DO 1. + UNTIL TICKS t >= END >> >> EVAL >>

HP-20S
Count: 4,170
Code: Unknown

HP 35s
Count: 3,652
Code: LBL B, +, GTO B001

TI-86
Count: 3612
Code: Lbl B:1+A->A:Goto B

HP 39gs
Count: 3607
Code: 1->A: DO A+1->A UNTIL A<=0 END:

Aurora 12c clone
Count: 3,554
Code: +, GTO 01

TI-95
Count: 3,350 counts
Code: 1 + GTO 0000

Radio Shack PC-2
Count: 3,317
Code: 1: A=A+1 2: GOTO 1 ; start with 0 stored in A.

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

HP-42S with "goose" disabled
Count: 3,067
Code: CLLCD, LBL 00 + GTO 00

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

HP-42S
Count: 2,115
Code: LBL 00 + GTO 00

HP-41CY Turbo
Count: 1,982
Code: LBL 00, +, GTO 00

HP 9G
Count: 1,470
Code: A=0; Lbl 0=; A=A+1; GOTO 0; END

HP 12c plat 25th anniv.
Count: 1,435
Code: +, Goto 001

HP 12c platinum
Count: 1,386
Code: + GTO 001

HP41CX Synthetic:
Count: 1,298 (Same HP41CX: Count 1075, code: LBL 01 + GTO 01, so +20%)
Code:
01 LBL "X" Just the label
02 1
03 "SeeRemark" !!! Synthetic string 9 long Decimal 249 96 7 117 131 131 131 64 178 176
this places 96 7 in N to be transferred in reg b, resulting in program counter in reg M, byte 6
In reg M synthetic code results in:
RDN ENTER ENTER ENTER + GTO 01
The GTO 01 is a COMPILED GTO jumping to the + before it!
You can SST this code but the GTO 01 takes a long time to reposition!
Yes, this can be optimized still a bit, but the loop is using 3 bytes!
04 0
05 X<> N
06 BEEP
07 STOP
08 STO b
09 END
INSTRUCTION: READ THIS
XEQ "X"
wait until beep, 000000,06 is displayed
press [R/S] to start counting
press [R/S] after 60 seconds, write down the count
perform a GTO .. !!! because the program pointer is in reg M, switching to program mode and TOUCHING A KEY results in MEMORY LOST!

CASIO PB-700
Count: 1282
Code: 1: A=A+1 2: GOTO 1 ; start with 0 stored in A.

Sharp PC-1251
Count: 1,277
Code: 1: A=A+1 2: GOTO 1 ; start with 0 stored in A.

HP 41c
Count: 1,063
Code: LBL 01 + GTO 01

HP-65
Count: 578
Code: Lbl 1, +, Goto 1

HP-10C
Count: 514
Code: LBL 0 + GTO 0

HP-25
Count: 512
Code: 01 + 02 GTO 01

HP 12c original (mfg. 1985)
Count: 500
Code: +; GTO 01

HP 25
Count: 483
Code: + GTO 01

TI SR-56
Count: 461
Code: + 1 = RST

TI SR-52
Count: 425
Code: + 1 = RST

HP-38C
Count: 387
Code: + GTO 01

TI 58C
Count: 387
Code: + 1 = RST

HP-29C
Count: 361
Code: LBL 0; +; GOTO 0

SHARP PC-1211
Count: 358
Code 1:Z=Z+1:GOTO 1 (starting with Z=0)

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

HP-33c (mfg. 1982)
Count: 319
Code: 01 + 02 GTO 01

HP 55
Count: 312
Code: + GTO 01

HP-19c
Count: 301
Code: LBL 1 + GTO 1

HP 15c (mfg. 1983)
Count: 297
Code: LBL A; +; GTO A

HP 16c: 293 (float 4)
Count: 293
Code: LBL A + GTO A

HP 34c: (I program) with -1 stored in I
Count: 277
Code: LBL A + GTO f I

HP 34c (mfg. 1981)
Count: 269
Code: LBL A; +; GTO A

TI-55
Count: 267
Code: + 1 RST

HP 34c:
Count: 259
Code: LBL A + GTO A

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

HP 16c: 230 (decimal, wsize 16, 2-complement)
Count: 230
Code: LBL A + GTO A

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

HP-97
Count: 223
Code: LBL1; +; GOTO 1

Texas Instrument TI-57LCD
Count: 216
Code: LBL_01 1 + GTO_01

TI-66
Count: 210
Code: + 1 = RST

TI-65
Count: 205
Code: 1 + RST

Texas Instrument TI-57LCD
Count: 195
Code: 1 + RST

TI-55
Count: 189
Code: + 1 = RST

TI BA 55
Count: 139
Code: + 1 = RST

Human hand Tapping + key
Count: 133

Elektronika MK-61
Count: 106
Code: + GSB 00

TI-62
Count: 100
Code: 1 + RST



Edited: 30 May 2010, 6:27 p.m. after one or more responses were posted


#38

Free-42 on IPOD Touch, 7,682,792

LBL 00
+
GOTO 00


#39

Ok, :-)

While emulators running on iphones, ipod touch, etc. are interesting, I'm personally only interested in real units with buttons that (mostly) click.

I won't be including any FREE42, etc, results in the table.

Not that they aren't interesting... :-)

#40

Hi Gene,

Nice list of results, I assume you will put it into an article once the entries dry up.

Just a note on the "Human hand tapping + key", that was performed on the MK-61, many can probably do it faster, but the MK-61 just doesn't seem to accept inputs any faster - I was just trying to see if I could beat the program.


Machine: HP 20S

Count: 4,837

Code: LBL A, +, 1, GTO A

Bart


Edited: 29 May 2010, 6:42 p.m.

#41

Machine: TI-89 Titanium
Count: 9339
Program: aa():Prgm:Lbl b:a+1->a:Goto 1: EndPrgm

Machine: TI-84 Silver Edition
Count: 13838
Program: Lbl 1:A+1->A: Goto 1

HP 50g
Count: 30198
Program: << WHILE 1 REPEAT 1 + END >>

#42

HP-71B Forth Xerxes:

COUNT= 46575 TIME USED=: 60.01 Seconds

Code: 46575 0 DO 1+ LOOP



Since this is not valid in run-time use:

Forth

: XERXES 1 SWAP 0 DO 1+ LOOP ;

46575 XERXES DROP

BYE



Very brute force program (Forth, Math Pac) to calculate count in 60 Seconds:



10 FORTHX ": XERXES 1 SWAP 0 DO 1+ LOOP ;"

20 DEF FNX(C) ! C=COUNT

30 C=INT(C) @ DIM T,F$ @ F$=STR$(C)&" XERXES DROP" @ T=TIME @ FORTHX F$ @ FNX=TIME-T-60

40 END DEF

50 R=FNROOT(20,50,FNX(FVAR))

60 DISP "HP-71B Forth Xerxes:" @ DISP "COUNT=";INT(R);" ";

70 DISP "TIME USED=:";FNX(INT(R))+60;" Seconds"

80 FORTHX "FORGET XERXES"

Of course with the use of HP-IL and 82164A RS-232 to get this listing ....

BR

Ray


#43

:-)

Does anybody know, if there is a speed difference between the two 71B-Forth versions?

#44

Machine:  HP 200 LX 2mb RAM: 
Count: 230
Method: Holding down the [+] key in HP Calc.

CHUCK



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

#45

HP41CX Synthetic:
Count: 1298 (Same HP41CX: Count 1075, code: LBL 01 + GTO 01, so +20%)
Code:

01 LBL "X" Just the label
02 1
03 "SeeRemark" !!! Synthetic string 9 long Decimal 249 96 7 117 131 131 131 64 178 176
this places 96 7 in N to be transferred in reg b, resulting in program counter in reg M, byte 6
In reg M synthetic code results in:
RDN ENTER ENTER ENTER + GTO 01
The GTO 01 is a COMPILED GTO jumping to the + before it!
You can SST this code but the GTO 01 takes a long time to reposition!
Yes, this can be optimized still a bit, but the loop is using 3 bytes!
04 0
05 X<> N
06 BEEP
07 STOP
08 STO b
09 END

INSTRUCTION: READ THIS
XEQ "X"
wait until beep, 000000,06 is displayed
press [R/S] to start counting
press [R/S] after 60 seconds, write down the count
perform a GTO .. !!! because the program pointer is in reg M, switching to program mode and TOUCHING A KEY results in MEMORY LOST!

BR

Ray

#46

Some more:

HP-32s    5973
HP-32sii 4715
HP-19c 301


- Pauli

#47

Machine: iPhone 3G running Byron Foster's HP42S emulator

Count: 2,700,667

Code: LBL AA + GTO AA

#48

TI83: (LBL B: A+1>>A : goto B)
3 times:
8106
8068
8052
(battery almost finished?)
Also did a FOR loop: 6606
and a WHILE loop: 4830

With ANS instead of dedicated variables:
Lbl B: ans +1: goto b
This gave 12986!

------------
HP12C from Brazil: 502 (same value after 3 tests)
HP12C from USA: 511 (idem). Perhaps voltage difference?
HP12C platinum from China (full silver version, no parenthesis): 3185

I also have the TI BA II plus pro, but it doesn't seem able to hold programs, any ideas to automate the addition?

REPLACE THIS TEXT WITH YOUR LISTING

Edited: 1 June 2010, 6:59 a.m.

#49

HP 34c (mfg. 1981)
Count: 269
Code: LBL A; +; GTO A

HP-33c (mfg. 1982)
Count: 319
Code: 01 + 02 GTO 01

CASIO PB-700
Count: 1282
Code: 1: A=A+1 2: GOTO 1 ; start with 0 stored in A.

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

#50

HP 9G

Count 1470

Code
A=0;
Lbl 0=;
A=A+1;
GOTO 0;
END

Edited: 29 May 2010, 12:24 p.m.


#51

HP-28S
Count: 5677
Code: HOME 1 << WHILE 1 REPEAT 1 + END >> EVAL

SHARP PC-1211
Count: 358
Code 1:Z=Z+1:GOTO 1 (starting with Z=0)

Texas Instrument TI-57LCD
Count: 216
Code: LBL_01 1 + GTO_01

 --      St
23.01 00 LBL 01
01 01 1
85 02 +
22.01 03 GTO 01

Texas Instrument TI-57LCD
Count: 195
Code: 1 + RST

 --      St
01 01 1
85 02 +
21 03 RST

Edited: 29 May 2010, 1:41 p.m.

#52

Gene:

Way back when, in the dark ages, and working on the dark side, we found that the count that we could get depended on the method of mechanizing the loop. Not really surprising, of course. Thus, with my TI-59 if I mechanize the loop as

1 + RST I get a one minute count of 635

1 + GTO 000 I get a count of 337

LBL A 1 + GTO A I get a count of 396

We decided that we really only wanted to compare add times. If I do the RST loop with different number of additions per loop I get

635 with 1 + RST

707 with 1 + 1 + RST

735 with 1 + 1 + 1 + RST

771 with ten additions per loop

779 with twenty additions per loop, and

787 with one hundred additions per loop.

We also found that we could get a comparable result to the 100 additions per loop measurement by doing a little algebra on the cases with one and two additiions per loop.

Palmer


#53

Hi Palmer!

I still owe you an email. :-)

I know that higher counts would occur if memory were filled with + instructions and not just a single + in a loop.

So, this test is addition and loop, I guess.

I'm sure the counts would be much higher for many machines like the TI 59, etc, if most of memory were + 1 + 1... and the HP machines might have an intense advantage since program memory would just be + and the numbers would be on the stack - no digit entry delay in a program.

But, yes, I know you're correct. :-)


#54

TI-95: 3350 counts
1 + GTO 0000

RST is missing on the TI-95.

#55

9825 B

Count 59,568

Code
0->A;
"start";
A+1->A;
gto "start";
end

#56

HP 85

Count 23,605

Code
10 Let A=0;
20 Let A=A+1;
30 goto 20;
40 END

#57

How would the 41 do in Mcode?

#58

HP 9815S

Count: 47,592

Code: 000 +

001 GOTO 000


Joel Setton

#59

Machine: HP 50g (SysRPL bint)
Count: 124445
Code:
!NO CODE !RPL
:: ZERO BEGIN #1+ GETTOUCH UNTIL DROP ;
@

Machine: HP 50g (SysRPL floating point)
Count: 56994
Code:
!NO CODE !RPL
:: BEGIN %1+ GETTOUCH UNTIL DROP ;
@

Machine: TI-86
Count: 3612
Code: Lbl B:1+A->A:Goto B

#60

Machine: Radio Shack PC-2

Count: 3,317

Code: 1: A=A+1 2: GOTO 1 ; start with 0 stored in A.

#61

Quote:
HP 16c: 293 (float 4) Count: 293 Code: LBL A + GTO A

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


The difference between these two is surprising. My HP-16c (the top one) hasn't been overclocked or anything yet it runs 20% faster.

Could there have been some extra code floating around in the second case? The GTO has to search to find the LBL and an extra step would slow things down.

It is probably worthwhile making sure that all LBL addressed calculators have had their program memory cleared before doing the test.


- Pauli

#62

HP-29C
Count: 361
Code: LBL 0; +; GOTO 0

HP-97
Count: 223
Code: LBL1; +; GOTO 1

HP-55
Count: 316
Code: +; GTO01

CURTA ONE :-)
Count: 222
Code: N/A

I was sort of surprised at the low number for the 97.

Edited: 29 May 2010, 10:54 p.m.


#63

Quote:
I was sort of surprised at the low number for the 97.

The HP-97 performs GTO by searching up to the entire program memory, from the GTO forward, wrapping around at line 224 if necessary. This is very inefficient when running tight loops where you're jumping backwards a lot. Think about it: "GTO 0... OK, I'm at line 003, where's LBL 0? Is it at line 004? No. Is it at line 005? No. Is it at line 006? No..." and so on.


HP tried to ameliorate this with the "rapid reverse branching" feature (GTO (i) where I < 0, which jumps -I lines backward, so you can jump to a specific line without the label search) but that is so awkward that hardly anyone ever uses it. The TI-58 and its relatives do this better because they support both "goto label" and "goto line number", but the HP-41C and HP-42S do this better still by using memoization, where you get the best of both worlds, i.e. freedom from having to keep track of line numbers, *and* the efficiency of a direct jump: they perform the same kind of label search as the HP-67/97/etc, but once they find the label, they store its location, and the next time that GTO or XEQ is executed, they can then jump straight to that LBL without having to search for it.


The HP-25 outperforms the HP-67 and HP-97 by a wide margin on this test, even though it uses pretty much the same hardware... just because its simplistic "goto line number" is much more efficient than the 67/97 "goto label".


Edited: 29 May 2010, 11:40 p.m.


#64

Thank you! Very interesting.

#65

Elektronika MK-61
Count: 243
Code: All program memory filled with +'s.

Admittedly, this is probably considered cheating since it avoids the GOTO that everybody else uses. But it finally means that there's a Soviet calculator that's faster than an HP, even if the HP happens to be more than 5 years older. ;)

#66

Casio fx-9860G Slim OS2

Count 55,924

Code
0->A Lbl 0 A+1->A Goto 0

Edited: 30 May 2010, 1:18 p.m. after one or more responses were posted


#67

FX-9860G SD
Count: 97,950
Code: 0->A : Lbl 0 : A+1->A : Goto 0

FX-9860G SD Fast Mode
Count: 206,250
Code: 0->A : Lbl 0 : A+1->A : Goto 0



An update to OS2 slows down the calculator significantly.

#68

Thanks for making that point. My results on the 9860G Slim were on a machine updated to OS2. I will edit that post to reflect that information.

#69

Gene:

Your table shows that the TI-55 yields 189 counts using + 1 = RST

I get 267 counts using 1 + RST

Palmer

#70

PC-1247
Count: 5180
Code: 1:A=A+1:GOTO1

TI-65
Count: 205
Code: 1 + RST

and a calculator that sets a new record:

TI-62
Count: 100
Code: 1 + RST

#71

TI-92

Count 5,686

Code  0->a  Lbl aa  a+1->a  Goto aa
#72

HP 39gs

Count 3607


Code  1->A:  DO  A+1->A  UNTIL A<=0  END:

Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime finally updated! Les Koller 8 2,291 12-10-2013, 09:25 PM
Last Post: Les Koller
  HP-70 simulator updated Willy R. Kunz 3 1,046 11-26-2013, 08:20 PM
Last Post: BShoring
  HP Prime - Reset methods bluesun08 3 1,155 11-21-2013, 09:49 AM
Last Post: Joe Horn
  How to add image to HP Forum Posting Harold A Climer 2 969 11-20-2013, 02:28 PM
Last Post: Han
  48G vs 49G+ User RPL Speed Comparison John Colvin 7 1,607 11-16-2013, 10:07 PM
Last Post: Han
  HP-42S ESD self-test Yriarte 2 1,007 10-24-2013, 09:08 AM
Last Post: Yriarte
  hp prime - sending program results to the stack giancarlo 6 1,321 10-15-2013, 02:00 AM
Last Post: Giancarlo
  HP Prime complex results Javier Goizueta 0 666 10-06-2013, 12:59 PM
Last Post: Javier Goizueta
  HP Prime Solving Nonlinear System of Equations for Complex Results Helge Gabert 11 2,638 09-30-2013, 03:44 AM
Last Post: From Hong Kong
  Updated PPC DVD Version 2.10: HP-41 Searchable Program Files and Scannable Barcode Jake Schwartz 3 1,257 09-27-2013, 09:51 PM
Last Post: Olivier (Wa)

Forum Jump: