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. ![]() 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: 1 Guest(s)