Calculator Performance Index

HP Programming Models.

The higher the Performance Index the faster the calculator.
A peformance index of 1 roughly corresponds to 3 instructions per second, see further down.

Here comes the list of already measured perform indices sorted by speed:
 
Calculator Type Introduction Execution time Loops (7)
Performance Index
Elektronika MK-61 RPN 1983 89 sec
1
0.40
TI-65
AOS
1987
42.2 sec
1
0.81
TI-66 Galaxy AOS 1983 34.7 sec 1
1.0
HP-55 RPN 1975 34.2 sec 1
1.0
Commodore PR-100 AOS approx. 1978 30 sec 1
1.1
Santron 626AOSunknown27 sec11.3
HP-33C RPN 1979 27 sec 1
1.3
HP-33E RPN 1978 26 sec 1
1.3
HP-34C RPN 1979 25.5 sec 1
1.3
HP-16C (3) RPN 1982 25.5 sec 1
1.3
HP-11C RPN 1981 22.3 sec 1
1.5
HP-19C
RPN
1977
22.2 sec
1
1.5
HP-97
RPN
1976
21.7 sec
1
1.6
HP-29C RPN 1977 21.6 sec 1
1.6
HP-25C RPN 1976 21.5 sec 1
1.6
HP-67 RPN 1976 21.5 sec 1
1.6
HP-10C RPN 1982 20.7 sec 1
1.6
HP-12C (1) RPN 1981 18.5 sec 1
1.8
HP-38C (8) RPN 1979 17.4 sec 1 2.0
HP-65 RPN 1974 16.5 sec 1
2.1
HP-11C on iPodRPN2008
15 sec1
2.3
HP-41CV RPN 1980 13.4 sec 1
2.5
TI-59 (unit 1) AOS 1977 13.4 sec 1
2.5
HP-41CX RPN 1983 13.1 sec 1
2.6
HP-15C (unit 1) RPN 1982 12.5 sec 1
2.7
HP-41C RPN 1980 12.2 sec 1
2.8
Casio fx-702P BASIC unknown 56.6 sec 10 6.0
HP-12C Platinum (1)
RPN
2003
5.3 sec
1
6.4
Sharp PC-1475 (double precision) BASIC 1988
43 sec
10 7.9
Casio PB-2000C C interpreter unknown 37.1 sec 10 9.2
Casio PB-770 BASIC approx. 1984 17.9 sec 5
9.5
HP-35s RPN 2007 35.9 sec 10 9.5
Casio fx-602P AOS 1981 33.5 sec 10 10
Sharp PC-1475 (single precision)
BASIC
1988
32sec
10 11
Sharp PC-1260BASIC198314 sec512
Sharp PC-1403 BASIC approx. 1986 29 sec 10 12
Casio fx-730P BASIC approx. 1984 29.1 sec 10 12
HP-42S RPN 1988 26.5 sec 10 13
HP-40G
Algebraic RPL
2000
20.1 sec
10 17
HP-39G
Algebraic RPL
2000
19.6 sec
10 17
Sharp PC-1500A BASIC 1982 17.6 10 19
HP-71B (version 2CDCC) BASIC 1984 8.2 sec 5
21
HP-38G
Algebraic RPL
1995
16 sec
10 21
Casio fx-795P
BASIC
1987
15 sec
10
22
HP-20S AOS 1989 14.5 sec 10 23
TI-74 BASIC 1986 6.9 sec 5
24
HP-32SII RPN 1991 14.2 sec 10 25
Casio FX-880P BASIC unknown 12.5 sec 10 27
HP-32S RPN 1988 10.2 sec 10 33
DM15LRPN201519.8 sec2034
Sharp PC-1600
BASIC
1986
9 sec
10 38
HP-33S RPN 2006 23 sec 30 44
HP-48GII (5)
RPL
2003
7.3 sec
10
46
HP-28S RPL 1988 6.3 sec 10 54
TI-89 (9)BASIC1998

64
HP-41CLRPN201310.5 sec2065
HP-75C (version aaaaaa) (4) BASIC 1982 14.3 sec 30
69
Sharp PC-E500/PC-E500S BASIC approx. 1989 9.5 sec 20
72
HP-48S
RPL
1991
4.1 sec
10 83
Casio fx-890P BASIC 1997 12.2 sec 30
84
Casio fx-890P C 1997 11 sec 30
93
HP-49G (2) RPL 1999 2.50 sec 10 136
HP-11C on 1st gen iPod
(AmeloConsulting)
RPNapprox. 2009

144
HP-48GX (4) RPL 1993 2.26 sec 10 150
Casio fx-CG10Casio special201119,3 sec100176
HP-15C Limited EditionRPN20128,7 sec50195
HP-48GII (6)
RPL
2003
1.54 sec
10
221
WP-34SRPN201113,6 sec100250
HP-48G+ (6)
RPL
2003
1.32 sec
10
258
HP-50g (6) RPL 2006 1.31 sec 10 260
HP-95LX
C++ compiler
1991
13 sec
100
262
HP-15C on iPhone4
(AmeloConsulting, V3.2.2)
RPN201121 sec300485
HP PrimePascal-like20142.73 sec100012,454
HP-42S on iPod
(Byron Foster, Free42)
RPN200820 sec1000017,000
HP-42S on iPhone4
(Byron Foster, V3.1.4, Free42)
RPN201132 sec5000053,100
Free42s on Nexus5 (10)
RPN

25.5 sec
1E5
139,000
Python 2.7.9.1 on i7-2600 (3.4 GHz),
brute force not using numpy (10)


4.68 sec
1E6
7,260,000
700 MHz Pentium Laptop C++ compiler around 2000 18 sec 1E7
19,000,000
1.6 GHz Atom CPU Notebook
MSVC++ compiler
2008
11.7 sec
1E7
29,000,000
2.66 GHZ Pentium PC
MSVC++ compiler
around 2003
8.1 sec
1E7
42,000,000
2.67GHz Intel Core i7 920MSVC++
around 20093.11 sec2E7218,000,000
3.50GHz Intel Core i7-3770K
MSVC2013 release
2015
5.94 sec
5e7
286,000,000

(1) The 12C has neither log() nor sin() functions. For the test these have been replaced with ln() and exp(). Measured on the unit with the 3 button-sized batteries.
(2) The speed of the HP-49G strongly depends on the machine settings. Execution time was measured using the built-in clock.
(3) In FLOAT-9 mode. Since the HP-16C offers neither log nor sin functions these have been replaced by square-root.
(4) Execution time was measured using the built-in clock.
(5) Standard settings, programmed numbers w/o trailing decimal point, using built-in clock.
(6) Standard settings, programmed numbers with trailing decimal point, using built-in clock (TICKS command).
(7) "Loops" is the number of loops thru the test program, see notes below.
(8) Uses natural log and exp instead of sine.
(9) Performance index courtesy of Peter Eberlein.
(10) Performance index courtesy of Dave L.



Remarks

There are a few surprising things to note:


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

[Remark 12/2010: Apparently, the test program executes 5 additions and substractions per loop, 1 multiplication and 1 division per loop, 2 square roots, 1 sine and one log. With 10 loops this results in a total of 74 "representative instructions" rather than the above mentioned 34. Also, the register store/load and branch instructions may not be neglected which would make it roughly 100 instructions in total. As a consequence, the above calculated performance index has to be multiplied by 3 to get more realistic "instructions per second".]

Regardless of the individual capabilities of different calculators always the same benchmark programs are used. This of course does not take advantage of advanced programming features that may present in some calculators.

Note that in order to reproduce the above performance numbers the same number of loops must be used. In general, using more loops will result in better performance. "Loops" in the table  above indicates the number of loops thru the 34-step test program. Executing more than one loop is necessary for fast calculators in order to be able to hand-measure the execution  time! This is achieved thru a "wrapper".


Programs Used

The red values must be adjusted to get measurable runtime durations.  
This is the "loops" number in the performance index table above.


RPN BASIC C/C++ RPL AOS RPN w/o labels
LBL A/0
10
STO A/0
LBL B/1
1
+
4.567E-4
-
70
+
69
-
7
x
11
/
RCL A/0
1
-
STO A/0
x<>0 ?
GTO B/1
Rv
log
sin
sqrt
sqrt
RTN

Wrapper: Expects

a count in register 
C/3.

LBL C/3
GSB/XEQ A/0
RCL C/3
1
-
STO C/3
x<>0?
GTO C/3
RTN
10 N=1000
20 L=10
30 X=L
40 X=X+1
50 X=X-4.567E-4
60 X=X+70
70 X=X-69
80 X=X*7
90 X=X/11
100 L=L-1
110 IF L<>0 THEN 30
120 X=LOG(X)
130 X=SIN(X)
140 X=SQR(X)
150 X=SQR(X)
160 N=N-1
170 IF N<>0 THEN 20
180 PRINT X
190 END
static void test() {
  const int loops=10000000;
  double x, r0;
  int i;
  for (i=0; i<loops; i++) {
    r0=10;
    do {
      x=r0;
      x+=1;
      x-=4.567E-4;
      x+=70;
      x-=69;
      x*=7;
      x/=11;
      r0-=1;
    } while (r0>0);
    x=log(x);
    x=sin(x);
    x=sqrt(x);
    x=sqrt(x);
  }
  printf("%f\n",x);
}
<<
1 10 START 0
  10 1 FOR x
    DROP
    x
    1 +
    4.567E-4 -
    70 + 69 -
    7 *
    11 /
  -1 STEP
  log sin 
  sqrt sqrt
NEXT
>>
LBL A/0
10 
STO A/0
LBL B/1
+
1
-
4.567E-4
+
70
-
69
=
*
7
/
11
=
STO B/1
RCL A/0
-
1
=
STO A/0
x<>0?
GTO B/1
RCL B/1
log
sin
sqrt
sqrt
RTN
01 1
02 0
03 STO 0
04 1
05 +
06 4
07 .
08 5
09 6
10 7
11 E
12 CHS
13 4
14 -
15 7
16 0
17 +
18 6
19 9
20 -
21 7
22 x
23 1
24 1
25 /
26 RCL 0
27 1
28 -
29 STO 0
30 x<>0 ?
31 GTO 04
32 Rv
33 log
34 sin
35 sqrt
36 sqrt
37 RTN
TI-58/59
MK-61 PR-100

000 76 LBL 
001 11 A 
002 01 1 
003 00 0 
004 42 STO 
005 00 0 
006 76 LBL 
007 12 B 
008 85 + 
009 01 1 
010 75 - 
011 04 4 
012 93 . 
013 05 5 
014 06 6 
015 07 7 
016 52 E 
017 94 - 
018 04 4 
019 85 + 
020 07 7 
021 00 0 
022 75 - 
023 06 6 
024 09 9 
025 95 =
026 65 * 
027 07 7 
028 55 / 
029 01 1 
030 01 1 
031 95 = 
032 42 STO 
033 01 1 
034 43 RCL 
035 00 0 
036 75 - 
037 01 1 
038 95 = 
039 42 STO 
040 00 0 
041 29 2nd CP 
042 22 INV 
043 67 2nd x=t? 
044 12 B 
045 43 RCL 
046 01 1 
047 28 log 
048 38 sin 
049 34 sqrt 
050 34 sqrt 
051 91 R/S
00 01 1
01 00 0
02 40 STO 0
03 01 1
04 10 +
05 04 4
06 0A .
07 05 5
08 06 6
09 07 7
10 0C EE
11 04 4
12 0B CHS
13 11 -
14 07 7
15 00 0
16 10 +
17 06 6
18 09 9
19 11 -
20 07 7
21 12 *
22 01 1
23 01 1
24 13 /
25 60 RCL 0
26 01 1
27 11 -
28 40 STO 0
29 5E X=0
30 04 JMP 04
31 25 Rv
32 17 log
33 1C sin
34 21 sqrt
35 21 sqrt
36 50 HALT
00 81 1
01 91 0
02 51 M
03 91 0
04 52 MR
05 91 0
06 84 +
07 81 1
08 85 -
09 71 4
10 92 .
11 72 5
12 73 6
13 61 7
14 93 EE
15 71 4
16 94 +/-
17 84 +
18 61 7
19 91 0
20 85 -
21 73 6
22 63 9
23 95 =
24 74 *
25 61 7
26 75 /
27 81 1
28 81 1
29 95 =
30 51 M
31 81 1
32 MR
33 0
34 -
35 1
36 =
37 M
38 0
39 -
40 1
41 =
42 SKIP
43 GTO 
44 0
45 4
46 MR
47 1
48 log
49 sin
50 sqrt
51 sqrt
52 R/S

TI-66
Casio fx-602P
Algebraic RPL

000 LBL 
001 A
002 1
003 0 
004 STO 
005 0
006 LBL 
007 B
008 +
009 1
010 -
011 4
012 .
013 5
014 6
015 7
016 E
017 4
018 +/-
019 +
020 7
021 0
022 -
023 6
024 9
025 =
026 *
027 7
028 /
029 1
030 1
031 =
032 STO 
033 1
034 RCL
035 0
036 -
037 1
038 =
039 STO
040 0
041 x<>t
042 0
043 x<>t
044 INV 
045 x=t?
046 B
047 RCL
048 1
049 log
050 sin
051 sqrt
052 sqrt
053 R/S
10
Min 01
LBL 0
+
1
-
4.567E-4
+
70
-
69
=
*
7
/
11
=
Min 02
MR 01
-
1
=
Min 01
x=0?
Goto 1
Goto 0
LBL 1
MR 02
log
sin
sqrt
sqrt
 
Outer loop:
10
Min 00
LBL 0
GSB P0
DSZ [00]
Goto 0
 
Test:
10>R :
DO
R + 1 - 4.567E-4
+ 70 - 69 >X :
X * 7 / 11 >X :
R - 1 > R
UNTIL R == 0
END
log(x) > X :
sin(x) > X :
sqrt(x) > X :
sqrt(x) > X

Outer loop:
FOR I=1 to 10;
RUN TEST
END :
BEEP 400;0.5 :
DISP 1; X :
FREEZE



 

HP Programming Models

The listings above give examples for the different models.
 
Keystrokes with no labels
It only allowed for branching to absolute program line numbers. Of course this made it very difficult to insert or remove instructions - in fact, the HP-25, which was the first calculator using this model, only allowed instruction overwriting.
Other HP models using this very limited programming scheme were the HP-10C, HP-12C, HP-33E/C, HP-38E/C, and HP-55.
Keystrokes with labels HP's first programmable calculator, the HP-65 (released 1974) already offered named labels and many of the Woodstock, Voyager, and Pioneer units offered labels as well. Labels were named with letters (A-E, A-J or A-Z) and/or numbers (0-9 or 00-99). Usually, these machines also offered program editing (insertion and deletion of instructions).
To make the programming task somewhat easier and program code more readable newer units (ie. HP-32S/SII, HP-33S) displayed the "program name" together with the line number. The program name was the label character that started the sequence of operations.
But this still didn't allow for local labels like in the HP-41C.
To overcome the restriction of a limited set of global labels the HP-35S used a more sophisticated version of branching to line numbers: When inserting/removing instructions the line number references in a program were automatically adjusted! This meant that the character labels A-Z need not be "wasted" for local program labels.
Keystrokes with extended labels The Coconuts (HP-41C and derivatives) extended the labelling scheme to strings. This allowed the user to give programs meaningful names. Aside from these global names a program could use local labels using 1-character letters or numeric labels 00-99.
The HP-42S, designed as the successor to the HP-41C, used the same labelling scheme.
RPL "Reverse Polish Lisp" was introduced with the HP-28 and later used in the HP-48/HP-49/50 models. RPL is a powerful structured language with sophisticated control instructions (ie. FOR .. NEXT). Programs are a special kind of variable type and can be named arbitrarily. RPL is stack oriented and supports strings, vectors and lists. Programs were written with a text editor and did not need GOTOs any more.
Algebraic RPL A special version of RPL introduced in the HP-38G.
BASIC HP-71C and HP-75C/D.