The 71B/Turtle and the 49G+/Hare: Results & Comments [LONG] « Next Oldest | Next Newest »

 ▼ Valentin Albillo Posting Freak Posts: 1,755 Threads: 112 Joined: Jan 2005 03-05-2004, 01:36 PM 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. ▼ R Lion (Spain) Senior Member Posts: 294 Threads: 32 Joined: Jul 2005 03-05-2004, 02:23 PM 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 Gene Posting Freak Posts: 1,107 Threads: 159 Joined: Jan 1970 03-05-2004, 07:16 PM 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 ▼ James M. Prange (Michigan) Posting Freak Posts: 1,041 Threads: 15 Joined: Jan 2005 03-05-2004, 09:44 PM Quote: It would be interesting to add the "setup" time to such a discussion too. Indeed it would, especially as optimizing a program for the fastest execution time often means spending extra time writing it. But the setup time would depend a lot on who's using each particular model. But what I really wanted to add to this thread is that it's not just the argument checking and dispatching for UserRPL commands that slow down the RPL models. After dispatching to a particular SysRPL program, that program of course executes SysRPL commands (unnamed in the UserRPL language that the ordinary user has access to), which very often call other SysRPL commands, which may well call yet other commands, and so on, before they get to the assembly language routines. A few SysRPL commands even do there own argument checking, and there's often conditional branching and/or looping involved. Try looking at how the PRVAR or SEND command works internally, for example. There's a tremendous amount of "smoke and mirrors" activity going on behind the scenes on these calculators to accomplish their "magic". This certainly doesn't seem like the fastest way to execute commands. It does allow using a SysRPL command for several different commands (saving on ROM size). I understand that (System) RPL was designed to speed the development of code for new models, which it no doubt does. Once a SysRPL command is written (and works as intended and documented), it never has to be written again (as long as the processor, or emulated processor on the 49g+, functions the same), just consider it a "black box" and call it (by name in a development environment, but by a "pointer" number in the final compiled code). The developer doesn't have to be concerned with how it works internally, as long as it does whatever it's supposed to do. Of course it can be re-written, to correct problems, optimize it for speed or size, or, I suppose, even add extra funtionality, as long as it still returns the expected result for any given argument(s). Of course instead of calling a SysRPL command by its 5-nibble address (or 6-nibble library/function numbers or flash code), they could've had it's code placed "in-line" instead for faster execution, but that would take up more ROM, and, I suppose, add to the problem of actually managing all of that ROM. The 49G is often slower than the 48G series, I suppose because of the CAS jumping in and sometimes because of extra objects types, while still using the same processor speed. The underlying ARM processor on the 49g+ is much faster than any physical Saturn processor, but of course the Saturn processor is emulated to run most of the 49g+'s code, so although the 49g+ is (usually, at least) faster than the 49G, not as much as one might suppose from looking at just the ARM processor speed. Even though the RPL calculators don't execute as fast as one might suppose based on increased processor speed alone, I expect that for most ordinary calculator uses, they're fast enough. Regards,James Edited: 5 Mar 2004, 10:32 p.m. Garth Wilson Posting Freak Posts: 887 Threads: 9 Joined: Jul 2007 03-05-2004, 10:20 PM > 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. ▼ James M. Prange (Michigan) Posting Freak Posts: 1,041 Threads: 15 Joined: Jan 2005 03-05-2004, 10:55 PM 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. HrastProgrammer Senior Member Posts: 381 Threads: 32 Joined: Mar 2006 03-06-2004, 03:39 AM 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 ... ▼ Valentin Albillo Posting Freak Posts: 1,755 Threads: 112 Joined: Jan 2005 03-06-2004, 06:02 PM 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. ▼ Massimo Gnerucci (Italy) Posting Freak Posts: 882 Threads: 23 Joined: Jan 2005 03-06-2004, 07:52 PM 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 ▼ HrastProgrammer Senior Member Posts: 381 Threads: 32 Joined: Mar 2006 03-07-2004, 02:34 AM 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.

 Possibly Related Threads... Thread Author Replies Views Last Post HP Prime: Long integers (continued) Helge Gabert 2 806 11-07-2013, 11:24 AM Last Post: Helge Gabert HP Prime: Pass "Long" Integers to a Program Helge Gabert 6 1,350 11-03-2013, 01:12 PM Last Post: Helge Gabert HP Prime polynomial long division bluesun08 13 1,975 10-30-2013, 03:29 AM Last Post: parisse hp prime - sending program results to the stack giancarlo 6 1,145 10-15-2013, 02:00 AM Last Post: Giancarlo HP Prime complex results Javier Goizueta 0 557 10-06-2013, 12:59 PM Last Post: Javier Goizueta HP Prime Solving Nonlinear System of Equations for Complex Results Helge Gabert 11 2,219 09-30-2013, 03:44 AM Last Post: From Hong Kong A very long HP-17BII equation Gerson W. Barbosa 22 3,052 04-19-2013, 12:37 AM Last Post: Gerson W. Barbosa A long WP-34S night Siegfried (Austria) 10 1,657 04-16-2013, 02:11 AM Last Post: Siegfried (Austria) HP-25 left on for a long, long, while Matt Agajanian 12 1,811 04-10-2013, 11:33 PM Last Post: Steve Leibson RPL long vs. short names peacecalc 5 1,085 10-30-2012, 01:25 PM Last Post: peacecalc

Forum Jump: