HHC 2018 Programming Contests
|
10-05-2018, 09:51 PM
Post: #77
|
|||
|
|||
RE: HHC 2018 Programming Contests
(10-05-2018 08:26 PM)3298 Wrote: - In the condition part of your WHILE loop, you use HEAD. That's the optimal solution. Points taken. “1 n-1 START DUP NEXT n” as a replacement for NDUPN was done mechanically when I realized the HP-48 lacked it. Your advice not to use that for small n is correct. By replacing those with DUP DUP sequences I’ve manage to save ten bytes. HEAD takes one additional nibble when compared to “1 GET”, but I didn’t know the former was more efficient as I haven’t timed both options. Yes, there are really some inconsistencies here and there, mainly because sometimes I am after smaller code and sometimes I want to be more clear. At this point I am glad my program works. Optimizations and improvements should be the next step, but I tend to stick with my first ideas, even though when are better ones around, so mine will not evolve much from here. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)