Relative speed of 15C, 34S and 42S - Printable Version +- HP Forums ( http://www.hpmuseum.org/forum)+-- Forum: Not HP Calculators ( /forum-7.html)+--- Forum: Not quite HP Calculators - but related ( /forum-8.html)+--- Thread: Relative speed of 15C, 34S and 42S ( /thread-9774.html) |

Relative speed of 15C, 34S and 42S - Michael de Estrada - 12-25-2017 04:27 PM
I recently received a DM42, and was curious as to its relative speed when compared to the original HP model as well as other similar models. I used a program originally written for the HP-15C that makes use of matrix operations and the root solver. I timed the execution with a watch, so the results are very crude, but they do give an indication of the relative speeds of these calculators. The results in descending order of execution times are as follows: HP 15C: 30 sec HP 42S: 10 sec HP 15C Limited Edition: 2 sec DM 15L @ 48 MHz: 2 sec WP 34S (HP 30b): 1 sec DM 42 @ 24 MHz: << 1 sec The most surprising result to me is how much faster the DM 42 runs, despite using twice the precision of the other calculators and not having the fastest CPU clock. RE: Relative speed of 15C, 34S and 42S - pier4r - 12-25-2017 05:04 PM
Hi! Yes the dm42 is really effective*! Even this other test shows it, with way larger gaps: http://www.hpmuseum.org/forum/thread-9750-post-86751.html#pid86751 * the clock speed is not all, a lot of optimization has to be done in software to use well the hw. RE: Relative speed of 15C, 34S and 42S - Dieter - 12-26-2017 08:51 AM
(12-25-2017 04:27 PM)Michael de Estrada Wrote: I recently received a DM42, and was curious as to its relative speed when compared to the original HP model as well as other similar models. I used a program originally written for the HP-15C that makes use of matrix operations and the root solver. This may be not the best idea for comparing speeds since the matrix and solver algorithms may be different. This is especially true for the 34s which definitely uses its own methods. (12-25-2017 04:27 PM)Michael de Estrada Wrote: The most surprising result to me is how much faster the DM 42 runs, despite using twice the precision of the other calculators The 34s does its internal calculations with 39 (!) digits, XROM code with 34, and sometimes even more, so its working precision is at least on par with the DM42. This happens both in single and double precision mode. (12-25-2017 04:27 PM)Michael de Estrada Wrote: and not having the fastest CPU clock. Is it true that the DM42 switches to a higher clock rate when connected to USB power? If yes, results for both rates may be interesting. Dieter RE: Relative speed of 15C, 34S and 42S - pascal_meheut - 12-26-2017 09:01 AM
(12-26-2017 08:51 AM)Dieter Wrote: Is it true that the DM42 switches to a higher clock rate when connected to USB power? If yes, results for both rates may be interesting. Just follow the link in the message above yours and you will get the figures. RE: Relative speed of 15C, 34S and 42S - Werner - 12-26-2017 10:11 AM
(12-26-2017 08:51 AM)Dieter Wrote: The 34s does its internal calculations with 39 (!) digits My one remaining wish for Free42, and the DM42 by extension. The 42S performs dot products with enhanced precision, so if only Free42 would do the same.. Alas, the Intel decimal floating-point library does not provide an extended precision format for doubles. Werner RE: Relative speed of 15C, 34S and 42S - Paul Dale - 12-26-2017 11:03 AM
(12-26-2017 08:51 AM)Dieter Wrote: This may be not the best idea for comparing speeds since the matrix and solver algorithms may be different. This is especially true for the 34s which definitely uses its own methods. I believe the HPs and the 34S use Doolittle's Method for LU Decompositions (matrix inversions, determinants and solving systems of equations). I'm not sure what approach Free42 uses. The solvers are definitely different, HP used the secant method, the 34S and Free42 use Ridder's method. Quote:The 34s does its internal calculations with 39 (!) digits, XROM code with 34, and sometimes even more, so its working precision is at least on par with the DM42. This happens both in single and double precision mode. There was also a considerable loss when we traded performance for bytes in the version 3 firmware. We squeezed a lot in but it hurt in other ways. Pauli RE: Relative speed of 15C, 34S and 42S - Dieter - 12-26-2017 12:59 PM
(12-26-2017 10:11 AM)Werner Wrote: The 42S performs dot products with enhanced precision, so if only Free42 would do the same.. The 42s, as all HP calculators since about 1976 I know of, uses extended precision for all internal functions. That's usually 3 additional digits which are used during internal calculations. So your wish may apply not only to the dot product but to any function. And this is how the 34s works, at least for those functions that do not rely on XROM code which is limited to 34 digits. Instead of the dot product try (√2+i) · (√2+2i) which includes a similar calculation. The real part of the result is √2 · √2 – 1 · 2 which, for the 34-digit value of √2, rounds to 2 – 2 so that Free42 and probably also DM42 will return 0 here. The 34s uses more internal digits, it returns –2,222285911147240187798653227487960 E–34 which is correct in all digits. Imagine what internal precision is required for this result. Is there any other calculator that comes close? Try the example on a hardware 42s (or a 35s), and you get –8,75 E–12 or –8,76 E–12 for the real part. This shows the three internal guard digits. The latter result is returned by the 35s and rounded up instead of down (actually it's –8,754...E–12). This may happen if you approach the internal precision limits. But let's not forget: DM42 works with 34 digits. The 42s has 12, or 15 with extended precision. So let's be fair. ;-) Dieter RE: Relative speed of 15C, 34S and 42S - Thomas Okken - 12-26-2017 08:13 PM
(12-26-2017 11:03 AM)Paul Dale Wrote:(12-26-2017 08:51 AM)Dieter Wrote: This may be not the best idea for comparing speeds since the matrix and solver algorithms may be different. This is especially true for the 34s which definitely uses its own methods. The LU Decomposition code in Free42 uses Crout's Method. The code comes straight from Numerical Recipes, section 2.3. RE: Relative speed of 15C, 34S and 42S - Werner - 12-26-2017 08:25 PM
.. and for complex calculations, too! Thanks for the example. For me, it’s not a matter of accuracy per se, but compatibility. I posted an Iterative Refinement program for the 42S here a while ago, that is useless on Free42. Werner RE: Relative speed of 15C, 34S and 42S - pier4r - 12-26-2017 08:26 PM
(12-26-2017 08:13 PM)Thomas Okken Wrote: The code comes straight from Numerical Recipes, section 2.3. I searched for "numerical recipes" and I saw one of the first appropriate usage of the new top level domains. http://numerical.recipes/ RE: Relative speed of 15C, 34S and 42S - Paul Dale - 12-26-2017 11:33 PM
(12-26-2017 12:59 PM)Dieter Wrote: The 34s uses more internal digits, it returns –2,222285911147240187798653227487960 E–34 which is correct in all digits. Imagine what internal precision is required for this result. Is there any other calculator that comes close? Complex multiplication, division and square root are performed using 72 digits. Pauli RE: Relative speed of 15C, 34S and 42S - Paul Dale - 12-27-2017 12:12 AM
(12-26-2017 08:13 PM)Thomas Okken Wrote: The LU Decomposition code in Free42 uses Crout's Method Thanks. Quote:The code comes straight from Numerical Recipes, section 2.3. Caveat emptor. Pauli RE: Relative speed of 15C, 34S and 42S - Thomas Okken - 12-27-2017 01:04 AM
(12-27-2017 12:12 AM)Paul Dale Wrote:(12-26-2017 08:13 PM)Thomas Okken Wrote: The code comes straight from Numerical Recipes, section 2.3. Eep! |