HHC 2021 Programming Contests - Surprise !
|
10-05-2021, 04:43 PM
Post: #17
|
|||
|
|||
RE: HHC 2021 Programming Contests - Surprise !
(10-04-2021 08:00 AM)3298 Wrote: On the topic of speed, I suspect newRPL would demolish my results, both UserRPL and SysRPL. Does it still count as an RPL machine, though? Since you mentioned newRPL... I ran John Keith's first algorithm (and smallest). The code needed no changes to run on newRPL, it was a straight copy/paste (and changed the trigraphs to proper characters). With the arguments 2000 2300: * From the keyboard, first run: 0.158 seconds, this is too fast so it completes before newRPL engages fast mode. * After the calc is busy and switches to fast mode it runs on 0.0614 seconds John Keith program takes 124 bytes in newRPL. I also ran your first code (smallest), the only change needed as you documented was the ADD command. Yours clocked at 0.258sec in slow mode and 0.169 sec in fast mode. The code ended up being 112 bytes, so it saved a few bytes (vs. John's) but pays the price in speed. John's algorithm gets the speed from building the list only once. I did not run the faster version for either of you. Now regarding your question: Why wouldn't newRPL count as an RPL machine? it runs the exact same RPL code you both posted (yours with a trivial change, granted), on the exact same hardware (50g). I understand it may make the judges work difficult in judging the size * speed thing, but no more than an original 48G vs. a 50g: the code will have the same size on both machines, but the 50g will be faster, so how do you compare them? in the calc in which it was submitted or on the fastest? newRPL code is faster but is also larger, so there's a compromise there. But other than that, running in newRPL you are still comparing your algorithm vs. John Keith's algorithm, the code didn't change at all so I don't see why it would matter. As long as you run both on the same platform to compare, it's valid. You could end up having a userRPL winner and a different newRPL winner since the best code for one platform may not be the best code for the other. Anyway, both routines are extremely compact and well written. Congrats to both of you! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 14 Guest(s)