Post Reply 
RPL Mini-Challenge: All Odd Digits?
07-02-2017, 07:53 PM (This post was last modified: 07-02-2017 09:26 PM by Gilles59.)
Post: #7
RE: RPL Mini-Challenge: All Odd Digits?
(07-02-2017 10:18 AM)Gerald H Wrote:  Further slightly shorter version:
Average score now 5.07

Hi Gerald, what do you mean with "average score" ?
Joe, how do you calculate the execution time ? Is it in the worst case?
This code is a variation of Gerald program but shorter and little faster :

Code:

« →STR
  0 8 FOR n 
    n →STR "" SREPL {DROP 0. 9} 2 IFTE
  STEP 
  0. ≠
»

67 bytes
Execution time on 1000-digit inputs :
Best case : 0.0619 s (101...111)
Worst case : 0.1351 s (111...111)

SREPL is very fast. I suspect it is ARM coded.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL Mini-Challenge: All Odd Digits? - Gilles59 - 07-02-2017 07:53 PM



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