List Commands Library for 50g
|
09-05-2017, 09:33 PM
(This post was last modified: 09-05-2017 09:40 PM by Joe Horn.)
Post: #114
|
|||
|
|||
RE: List Commands Library for 50g
The problem of long garbage collections when there are a lot of exploded list items on the stack can be avoided by first storing the list into a global variable. The built-in SORT routine does this by doing the following before anything else:
Code: ID '{} This stores a copy of the input list into a hidden global variable called '{} (the name doesn't matter), recalls it from there, discards the TRUE from level 1, and then goes about sorting the list without worrying that garbage collections will take forever. It's a great trick; just remember to purge the variable afterwards, even if the operation is aborted midway. SORT uses the SysRPL command PuHiddenVar for that. <0|ΙΈ|0> -Joe- |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)