Post Reply 
Programming puzzles: processing lists!
05-26-2018, 10:17 AM
Post: #239
RE: Programming puzzles: processing lists!
user rpl question:
- With all the talking about stack and lists here: it seems that the stack is maintained as array of pointers while list, on extension, have to be duplicated. Therefore the larger they are, the more intensive is to extend them of 1 element.

If instead I size a list large enough to likely keep the output I expect, therefore only modifying its elements. Is it any faster than extending a list?

In other words is:
{ ... large list with, say, 200 elements } 1 +
faster or slower than
{ .... list with 201 elements } 201 1 PUT

If I remember correctly the knowledge shared by DavidM, with PUT the list will be exploded and modified, but this may be less costly than copying it entirely.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Programming puzzles: processing lists! - pier4r - 05-26-2018 10:17 AM

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