Reverse a list
alex at tweedly.net
Mon Feb 16 19:19:51 EST 2015
You were right first time ....
if you use a reference, then there is no copy created when you do the
call; and then you build up the output list.
without the reference, there is an initial copy and then you
additionally build the output list.
So using a reference parameter saves the memory for one copy (plus the
cpu to create the copy).
On 16/02/2015 23:06, Peter M. Brigham wrote:
> I wrote:
>> I referenced the list and turned the function into a command, saves memory (possibly speed?) on very large lists.
> I just realized that no memory is saved this way because we are building a new duplicate (reversed) list within the command. So referencing the list has no advantage.
> -- Peter
> Peter M. Brigham
> pmbrig at gmail.com
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode