From: Walton Hoops Date: 2010-12-20T15:53:15+09:00 Subject: Re: Arrays and Lists ? On 12/19/2010 02:03 PM, Peter Vandenabeele wrote: > If I understand correctly, this means that the cost of moving the > data around as the array grows is O(n.log(n)). > > The more I see of this, the more I love Ruby :-) Also, Ruby is using realloc to resize the array, meaning it tries to grow it in place and only copy if it has to. I won't even try to speculate on how often it manages to grow in place, but it does mean in the best-case scenario there is no moving cost.