Anonymous user
Talk:Hofstadter Figure-Figure sequences: Difference between revisions
Talk:Hofstadter Figure-Figure sequences (view source)
Revision as of 21:17, 20 July 2013
, 10 years ago→timings for the REXX solutions: changed IF statement to use short circuit. -- ~~~~
(→timings for the REXX solutions: added a new section. -- ~~~~) |
m (→timings for the REXX solutions: changed IF statement to use short circuit. -- ~~~~) |
||
Line 35:
I normally don't including timings for the REXX solutions that I post, but when I saw the 2<sup>nd</sup> REXX example's timings,
<br>I decided to go back and include the timings here as the 2<sup>nd</sup> example's timings seemed a bit high.
<br><br>I didn't expect a
<lang rexx>/*REXX pgm to calculate & verify the Hofstadter Figure-Figure sequences.*/
call time 'Reset'
Line 81:
ffs: procedure expose r. s. rr. ss.; parse arg n
do k=1 for n while s.n==0 /*search for not null R │ S num.*/
if s.k\==0
km=k-1; _=s.km+1 /*the next SS number, possibly.*/
_=_+rr._ /*maybe adjust for the FRR num.*/
Line 106:
took 1.58 seconds.
</pre>
The (above) example was run under Windows 7 on
<br><br>
|