On Wed, Sep 26, 2012 at 3:21 PM, Tridib Bandopadhyay
<lists / ruby-forum.com> wrote:

> names = Array.new(614400000)
...
> Ruby took around 308 seconds to create this large array. Can anyone tell
> me why Ruby takes such a long time?

Precisely BECAUSE it's so large!  You may well have been running out
of memory, needing to swap RAM out to disk, which is very very slow.
Whatever you were intending to do with such a huge array, would
probably benefit from a good hard look at alternative algorithms,
especially focusing on dealing with only a small subset of the data at
one time.

-Dave

-- 
Dave Aronson, T. Rex of Codosaurus, LLC... aka
Available Secret-Cleared Ruby/Rails Freelancer
(NoVa/DC/Remote); see http://www.Codosaur.us/.