Post Reply 
[VA] SRC #012c - Then and Now: Sum
12-04-2022, 09:50 AM (This post was last modified: 12-04-2022 10:41 AM by J-F Garnier.)
Post: #32
RE: [VA] SRC #012c - Then and Now: Sum
(12-04-2022 08:49 AM)Werner Wrote:  Questions!
- Why does Albert’s code run so much slower than J-F’s, while doing 31 loops vs 40?
- Why is a 71B still so much faster than a 42S for similar programs, having even a slower CPU? (My code is down to 31 secs, and is more like Albert’s than like J-F’s, doing 33 loops).
Cheers, Werner

Probably a bit OT question, but especially interesting for me!

- I don't fully understand Albert's code, so I'm not sure if his iterative algorithm can be compared to mine/yours.
But there may be at least two reasons that contribute to slower speed:
use of a user function to get f(n) whereas they are precalculated for me,
and FNx user functions overhead.

- for the relative speed of the 42S and 71B, the 42S indeed is not a fast machine due to the System RPL overhead.
The 32S in pure assembly code (as the 71B with similar clock speed, so comparable), is actually faster than the 42S, this is one of the reasons I prefer it to the 42S. The 32SII is unfortunately not as fast as the 32S, for reasons that are really OT here.
From here, relative execution times (the shorter, the better):
- 4:22 HP-32S Keystroke / RPN
- 5:03 HP-32SII Keystroke / RPN / Ver.0
- 12:12 HP-42S Keystroke / RPN / Ver.C

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] SRC #012c - Then and Now: Sum - J-F Garnier - 12-04-2022 09:50 AM



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