List Commands Library for 50g
|
07-23-2017, 09:25 PM
Post: #53
|
|||
|
|||
RE: List Commands Library for 50g
(07-23-2017 02:03 PM)John Keith Wrote: Unless I'm mistaken, the Goferlists function Subs also does this. It remains to compare the three programs as to the order of the permutations in the output list. You aren't mistaken, John. Subs not only creates all of the sublists, but it does it very quickly as well. A sample test using a nine-element list as the input shows Subs creating the list in about 1.8 seconds. The sample UserRPL code I showed in the previous note completes the same task in about 8.9 seconds. (07-23-2017 03:35 PM)John Keith Wrote: This is a welcome change. However, the execution time has increased compared to the previous version (4.8s vs. 2.4s for a list of 1000 single-digit integers) The amazing thing about this is that the time only doubled. The first 2-3 attempts were actually even slower. The previous version was able to benefit from the use of a fast Saturn routine, but that same method no longer applied with the new treatment of digits. The loop was also slowed down slightly with the check for identifiers that was added by combining the previous LV→I functionality. Is the time savings worth having a separate command that uses the previous method? (07-23-2017 03:35 PM)John Keith Wrote: As a further example, the following simple program produces the digits of Champernowne's constant ending with the supplied integer: Or even simpler: Code: \<< LSEQ NL\->I \>> |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)