Hi all,

As promised a few days ago, these are the compiled results for the original suite of 5 math tests executed in a number of advanced Saturn models, namely HP-71B, HP48/49G/49G+, plus two 71B emulators.

All times are in seconds, HP-71B code has been included for all tests, and some pertinent comments are given after the results.

----------------------------------------------------------------------

| |

|Test 1: Matrix operations: |

| |

| Set up the test by creating a real-valued matrix A with the |

| specified dimensions, and fill it up with different random |

| values between 0 and 1. Then perform the specified matrix |

| operations in-place. |

| |

| HP-71B setup code: |

| |

| OPTION BASE 1 |

| N = 10 (or 20, 30, 40) |

| DIM A(N,N) |

| FOR I=1 TO N @ FOR J=1 TO N @ A(I,J)=RND @ NEXT J @ NEXT I |

| |

| HP-71B code: MAT A = INV(A) |

| MAT A = A*A |

| MAT A = A+A |

| |

----------------------------------------------------------------------

| Inversion | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

----------------------------------------------------------------------

| 10x10 | 7.5 | 2.26 | 4.89 | 5.2 | - | 2.48 |

| 20x20 | 57 | 14.00 | 28.2 | 31.5 | - | 18.02 |

| 30x30 | 185 | 42.70 | 82.3 | 105.5 | - | 58.93 |

| 40x40 | 432 | 93.40 | 185 | 188.5 | - | 136.81 |

----------------------------------------------------------------------

|Multiplicat| HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

----------------------------------------------------------------------

| 10x10 | 7.3 | 1.30 | 2.31 | 2.4 | - | 2.37 |

| 20x20 | 57 | 9.49 | 17 | 10.6 | - | 18.38 |

| 30x30 | 188 | 30.72 | 56.4 | 34.6 | - | 61.69 |

| 40x40 | 435 | 70.52 | 132 | 131.6 | 8 | 145.53 |

----------------------------------------------------------------------

| Addition | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

----------------------------------------------------------------------

| 10x10 | 0.4 | 0.24 | 0.58 | 0.8 | - | 0.15 |

| 20x20 | 1.7 | 1.16 | 2.95 | 3.8 | - | 0.58 |

| 30x30 | 3.7 | 2.71 | 7 | 10.1 | - | 1.27 |

| 40x40 | 6.7 | 4.86 | 12.95 | 15 | - | 2.25 |

----------------------------------------------------------------------

| |

|Test 2: Polynomial solver |

| |

| Find all roots (both real and complex), of the 100th-degree |

| polynomial equation: |

| |

| x^100 + x^99 + x^98 + ... + x^2 + x + 1 = 0 |

| |

| HP-71B setup code: |

| |

| OPTION BASE 1 |

| COMPLEX R(100) |

| DIM C(101) |

| MAT C = (1) |

| |

| HP-71B code: |

| |

| MAT R = PROOT(C) |

| |

| HP-71B result verification: |

| |

| COMPLEX P @ P=1 |

| FOR I = 1 TO 100 @ P = P * R(I) @ NEXT I @ DISP P |

| |

| gives (0.999999999944, 1.312E-12). The exact value is (1,0) |

| |

----------------------------------------------------------------------

| Model | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

----------------------------------------------------------------------

| Time | 1939 | 302 | 533 | 563 | 31 | 597.76 |

----------------------------------------------------------------------

| |

|Test 3: Integral & Solve combined |

| |

| Find the value of X in [1,2] such that the value of the |

| following integral equals 1/2. We care to get about |

| 5 correct decimal places for X (precision = 1E-5) |

| |

| /X |

| | 2 |

| | Sin(x ).dx = 1/2 |

| | |

| /0 |

| |

| HP-71B code: (in radians mode) |

| |

| FNROOT(1, 2, INTEGRAL(0, FVAR, 1E-5, SIN(IVAR * IVAR)) - 0.5) |

| |

| HP-71B result: X = 1.2039153, correct to 8 digits |

| |

----------------------------------------------------------------------

| Model | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

----------------------------------------------------------------------

| Time | 42 | 19.39 | 36.35 | 36.5 | 0.3 | 12.81 |

----------------------------------------------------------------------

| |

|Test 4: Double integrals |

| |

| Compute the following integrals using precision = 1E-3 |

| |

| |

| /2 /X |

| | | |

| I1 = | | (x + y).dy.dx |

| | | |

| /1 /1 |

| |

| |

| /1 /1 |

| | | x^2*y^2 |

| I2 = | | e .dy.dx |

| | | |

| /0 /0 |

| |

| HP-71B code: |

| |

| 10 DEF FNF(X, Y) = X + Y |

| 20 DEF FNG(X) = INTEGRAL(1, X, 1E-3, FNF(X, IVAR) |

| 30 I1 = INTEGRAL(1, 2, 1E-3, FNG(IVAR)) |

| and |

| 10 DEF FNF(X, Y) = EXP(X * X * Y * Y) |

| 20 DEF FNG(X)=INTEGRAL(0, 1, 1E-3,FNF(X,IVAR)) |

| 30 I2 = INTEGRAL(0, 1, 1E-3,FNG(IVAR)) |

| |

| HP-71B results: |

| |

| I1 = 1.50000 (correct to 6 digits) |

| I2 = 1.1351 (correct to 5 digits) |

| |

----------------------------------------------------------------------

| Integral | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

---------------------------------------------------------------------

| I1 | 17 | 3.229 | 7.36 | 6 | - | 3.44 |

| I2 | 35 | 9.27 | 19.22 | 17.5 | 1.5 | 7.39 |

----------------------------------------------------------------------

| |

|Test 5: Triple integral |

| |

| Compute the following triple integral (precision = 1E-3): |

| |

| |

| /2 /X /X*Y |

| | | | |

| I = | | | (x * y * z).dz.dy.dx |

| | | | |

| /0 /0 /0 |

| |

| HP-71B code: |

| |

| 10 DEF FNF(X, Y, Z) = X * Y * Z |

| 20 DEF FNG(X, Y) = INTEGRAL(0, X*Y, 1E-3, FNF(X,Y,IVAR)) |

| 30 DEF FNH(X) = INTEGRAL(0, X, 1E-3, FNG(X, IVAR)) |

| 40 I = INTEGRAL(0, 2, 1E-3, FNH(IVAR)) |

| |

| HP-71B results: |

| |

| I = 4.0000 (correct to 5 digits) |

| |

----------------------------------------------------------------------

| | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X |

----------------------------------------------------------------------

| | 1242 | 237 | 550 | 483 | 18 | 252.76 |

----------------------------------------------------------------------

**Notes:**

- Results for matrix operations in the 49G/G+/48GX aren't

for operations*in place*.*In place*means that the result matrix

is the same as the original matrix, no extra matrix memory is

allocated for the result. That's the case for the featured HP-71B code. - Results for the HP49G/G+ kindly submitted by
**Arnaud Amiel**and

by**Doug Rohm**, both coincide very closely. - Results for the HP48GX kindly provided by
**R. Lion** **HP-71X**is an HP-71B emulator running on HP48/49 hardware.

Here, it has been used in 33.5K RAM configuration with ports 1..3

CLAIMed and port 4 containing the MATH ROM. Times given are

for an HP49G. The times on HP-48GX are the same (+/- 0.1 seconds).

HP-71X has been developed by**HrastProgrammer.****Emu71**is an HP-71B emulator running on Windows systems.

Emu71's tests done on a 2.3GHz Celeron in a Windows2000 Comand Box

in full screen mode, and with Emu71 fast option ('Emu71 /f' command).

Emu71 has been developed by**J-F Garnier**.- For
*Test2: Polynomial Solver*, the HP-71B roots' verification

gives (0.999999999944, 1.312E-12), while the HP49G+ gives

(0.999999994031,1.441E-12). For the real part, which should be

exactly 1, this means the verifications are correct to 10 and

8 decimal places respectively, i.e.: the later error is 100 times larger.

The HP48GX gives (0.999999994032,2.066E-12) , which also has a

100-times larger error in the real part, and nearly 2-times larger

in the imaginary part. - To my original question how come the new HP49G+ isn't from 6.5 to 10 times faster than the HP-71B, as it should given its underlying hardware and software,
**Arnaud Amiel**offered this plausible explanation:*"The 48/49 have nearly 30 different objects and for each RPL operations the arguments are checked to decide what to do with them. This creates quite some overhead [...] I would think the 71 does not have this overhead. If you look inside of the 49 ROM, you will eventually get to some ASM routines but a lot of sysRPL checking and conditioning of the arguments take place before you get there. [...] As a whole I would think that the main reason why you don't get 6.5 times speed increase would be: argument checking and garbage collection."*I mostly agree with this explanation, but nevertheless I find it quite amazing that such things as argument checking and garbage collection would have such a large impact on performance, as to nearly halve it.

Argument checking, for instance, should be done just once, before the, say, matrix inversion algorithm begins. It can take a second or three, but after that, the inversion procedure proper should take place and consume most of the time. Can't imagine each value being constantly checked while the inversion is taking place. Same goes for garbage collection, it can take some time at the beginning and/or the end of the procedure, but not while the inversion process is running. So, some overhead I would expect, but not nearly as large as 50% of the total time in such a lengthy, complicated calculation.

- Some comparative results between the HP-71B and the HP48GX are puzzling to say the least. It seems that the HP48GX can multiply matrices from 3 to 5 times faster than the HP-71B, yet it adds them up
*3 times slower*! What gives ? - Both emulators perform extraordinarily well. Emu71's speed has to be seen to be believed, but the sheer portability and take-anywhere character of HP-71X makes it a most convenient platform to run your HP-71B programs and computations on the move.

Anyway, when all's said and done, I still feel that the HP-71B does extraordinarily well against technology 20+ years more advanced. A real tribute to just how incredibly good products they use to design back then in the 'golden age' of HP.

Any and all comments and/or corrections welcome.

Best regards from Valentin Albillo

*Edited: 5 Mar 2004, 1:43 p.m. *