Relative speed of 15C, 34S and 42S

12252017, 04:27 PM
Post: #1




Relative speed of 15C, 34S and 42S
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 HP15C 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. 

12252017, 05:04 PM
(This post was last modified: 12252017 05:05 PM by pier4r.)
Post: #2




RE: Relative speed of 15C, 34S and 42S
Hi!
Yes the dm42 is really effective*! Even this other test shows it, with way larger gaps: http://www.hpmuseum.org/forum/thread975...l#pid86751 * the clock speed is not all, a lot of optimization has to be done in software to use well the hw. Wikis are great, Contribute :) 

12262017, 08:51 AM
(This post was last modified: 12262017 08:53 AM by Dieter.)
Post: #3




RE: Relative speed of 15C, 34S and 42S
(12252017 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 HP15C 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. (12252017 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. (12252017 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 

12262017, 09:01 AM
Post: #4




RE: Relative speed of 15C, 34S and 42S  
12262017, 10:11 AM
Post: #5




RE: Relative speed of 15C, 34S and 42S
(12262017 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 floatingpoint library does not provide an extended precision format for doubles. Werner 

12262017, 11:03 AM
Post: #6




RE: Relative speed of 15C, 34S and 42S
(12262017 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 

12262017, 12:59 PM
(This post was last modified: 12262017 01:00 PM by Dieter.)
Post: #7




RE: Relative speed of 15C, 34S and 42S
(12262017 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 34digit 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 

12262017, 08:13 PM
Post: #8




RE: Relative speed of 15C, 34S and 42S
(12262017 11:03 AM)Paul Dale Wrote:(12262017 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. 

12262017, 08:25 PM
Post: #9




RE: Relative speed of 15C, 34S and 42S
.. 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 

12262017, 08:26 PM
Post: #10




RE: Relative speed of 15C, 34S and 42S
(12262017 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/ Wikis are great, Contribute :) 

12262017, 11:33 PM
Post: #11




RE: Relative speed of 15C, 34S and 42S
(12262017 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 

12272017, 12:12 AM
Post: #12




RE: Relative speed of 15C, 34S and 42S
(12262017 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 

12272017, 01:04 AM
Post: #13




RE: Relative speed of 15C, 34S and 42S
(12272017 12:12 AM)Paul Dale Wrote:(12262017 08:13 PM)Thomas Okken Wrote: The code comes straight from Numerical Recipes, section 2.3. Eep! 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)