The Museum of HP Calculators

HP Forum Archive 14

 The 71B/Turtle and the 49G+/Hare: Results & Comments [LONG]Message #1 Posted by Valentin Albillo on 5 Mar 2004, 1:36 p.m. 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.

 a comment about 48GX results...Message #2 Posted by R Lion on 5 Mar 2004, 2:23 p.m.,in response to message #1 by Valentin Albillo Just to remember that the 48GX I used, had Metakernel & Erable installed (and 1280kb of total RAM). Perhaps a 48 "out of the box" gives diferent times... Raul L

 Re: The 71B/Turtle and the 49G+/Hare: Results & Comments [LONG]Message #3 Posted by Gene on 5 Mar 2004, 7:16 p.m.,in response to message #1 by Valentin Albillo Another thought: How much time is involved in getting the machines READY to do the operations? How likely are mistakes in getting the machines ready to do the operations? For example: If I doing some statistics, there are times when I would reach for the 49g+, but there are times when it is much much faster to grab my 12c and do the work. The equationwriter on the 49g+ makes it very easy to enter integrals and SEE that they are correct. Is it really as easy to do on the 71B? perhaps, perhaps not. :-) Entering a matrix...the matrix writer may be an easier way to see a matrix. Etc. It would be interesting to add the "setup" time to such a discussion too. food for thought. Gene

 Re: The 71B/Turtle and the 49G+/Hare: Results & Comments [LONG]Message #5 Posted by Garth Wilson on 5 Mar 2004, 10:20 p.m.,in response to message #3 by Gene > Another thought: > How much time is involved in getting the machines READY to do the operations? > It would be interesting to add the "setup" time to such a discussion too. That was part of the value with the HP-71B. Processing huge arrays of data has no practical value if you have to enter it by hand. Although more speed from my 71 would have been welcome, it was great to be able to interface it to an almost unlimited array of electronic instrumentation to get thousands of points of data quickly for the analysis, and print graphs of the results. HP cut the capabilities way back when they dropped the HPIL (and the HPIL-to-HPIB interface converter). Their new supercalculators just cannot compete in this area, regardless of clock speed.

 Re: The 71B/Turtle and the 49G+/Hare: Results & CommentsMessage #6 Posted by James M. Prange on 5 Mar 2004, 10:55 p.m.,in response to message #5 by Garth Wilson Well, with the 48 series and 49G, you can gather data over the RS-232 style port, or the IR port for the 48 series, although those connect to only one other device at a time. For gathering data from several devices without changing connections, you'd have to somehow have them "multiplexed" through a single device. The 49g+ has USB instead, so any "via wire" connection has to be to a USB host with the 49g+ device driver installed. For IR, you need an IrDA device or an IrDA adapter. Edited: 5 Mar 2004, 10:57 p.m.

 Re: A correction to the HP-71X resultsMessage #7 Posted by HrastProgrammer on 6 Mar 2004, 3:39 a.m.,in response to message #1 by Valentin Albillo Thanks for the compilation of results. Unfortunately, I must here correct the results of double and triple integrals on HP-71X running on HP-49G because I used the following HP-71B programs to make a test: ```20 DEF FNG(X) = INTEGRAL(1, X, 1E-3, X + IVAR) 30 I1 = INTEGRAL(1, 2, 1E-3, FNG(IVAR)) 20 DEF FNG(X) = INTEGRAL(0, 1, 1E-3, EXP(X * X * IVAR * IVAR)) 30 I2 = INTEGRAL(0, 1, 1E-3,FNG(IVAR)) 20 DEF FNG(X, Y) = INTEGRAL(0, X*Y, 1E-3, X + Y + IVAR) 30 DEF FNH(X) = INTEGRAL(0, X, 1E-3, FNG(X, IVAR)) 40 I = INTEGRAL(0, 2, 1E-3, FNH(IVAR)) ``` I appologize for the this but, as the exact test programs haven't been provided at the beginning, I used the faster inline method without DEF FNF. Sorry :-( The corrected results are: ``` ---------------------------------------------------------------------- | | |Test 4: Double integrals | | | ---------------------------------------------------------------------- | Integral | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X | --------------------------------------------------------------------- | I1 | 17 | 3.229 | 7.36 | 6 | - | 5.37 | | I2 | 35 | 9.27 | 19.22 | 17.5 | 1.5 | 10.59 | ---------------------------------------------------------------------- | | |Test 5: Triple integral | | | ---------------------------------------------------------------------- | | HP-71B | 49G+ | 49G | 48GX | Emu71 | HP-71X | ---------------------------------------------------------------------- | | 1242 | 237 | 550 | 483 | 18 | 382.11 | ---------------------------------------------------------------------- ``` This is now consistent with the fact that HP-71X is about 3.1 times faster than HP-71B. Even with these corrected results it is faster than native HP-48GX and HP-49G in all tests except 'Matrix Multiplication' and 'Polynomial Solver'. It is even faster than 49G+ in 'Matrix Addition' and 'Integral & Solve'. This only proves the quality of HP-71B assembler code as it is the last HP calculator with operating system written in 100% assembler (I think) - no RPL inside. Regards ...

 Re: A correction to the HP-71X resultsMessage #8 Posted by Valentin Albillo on 6 Mar 2004, 6:02 p.m.,in response to message #7 by HrastProgrammer Thank you very much for the corrected results, and very interesting additional comments. I'll merge your corrected results in the final 'article' which will include the results for all 10 tests, within a few days. If you would consider running the new, harder, final tests (6 to 10) in your marvelous HP-71X emulator, it would be great. By the way, your HP-71X is certainly an extraordinary achievement. If I ever get a 48G, first thing I'll do is to buy a copy from you, and would encourage any 48/49 user interested in a new, powerful way of performing advanced math computations to do likewise. HP-71B advanced Technical BASIC and RPL together in a single handheld: The Best of Both Worlds ! :-) Best regards from VA.

 Re: A correction to the HP-71X resultsMessage #9 Posted by Massimo (Italy) on 6 Mar 2004, 7:52 p.m.,in response to message #8 by Valentin Albillo Quote:HP-71B advanced Technical BASIC and RPL together in a single handheld: The Best of Both Worlds ! :-) Don't forget HP-41X and HP-42X. I do run all of them in a 1280K double speed 48 (41X & 42X in a 49): this way you have the Best of All (four up to now) Worlds ;-) I couldn't thank Hrast enough for his wonderful achievements! Greetings to you both,Massimo

 Re: A correction to the HP-71X resultsMessage #10 Posted by HrastProgrammer on 7 Mar 2004, 2:34 a.m.,in response to message #9 by Massimo (Italy) Thanks Valentin and Massimo ... I will try to do the new tests today and I bet the 1 : 3 ratio will remain ... I couldn't thank Hrast enough for his wonderful achievements! Well, this is the best thanks :-) Currently, only HP-12/15/16C emulation is missing to have the best of All Worlds Ever on 48/49 (and 49+, perhaps)! Best regards to all.

Go back to the main exhibit hall