From: Clement Ow Date: 2008-04-08T10:36:21+09:00 Subject: Re: Do arrays use up alot of memory space? Robert Dober wrote: > On Mon, Apr 7, 2008 at 6:29 AM, 7stud -- wrote: >> > U:/movtest/new1] >> takes up 1 byte of memory. I don't know exactly what the overhead for >> an array is, but it is comparatively tiny--although you never know with >> ruby. > A well judged statement again.... > > For Ruby 1.9 the overhead of an array is one long and 4 VALUES, I am > not a VM Guru but it would surprise me a lot if a VALUE used more than > 4 bytes given their semantic meanings shared flags and klass, the > fourth being a pointer to the content. > I am sure that someone will correct me if I am wrong but I estimate > the overhead of less than 21 bytes. > > I would guess all your arrays would take up less than 1,000 >>yes that seems indeed a save guess.... > HTH > Robert > -- > http://ruby-smalltalk.blogspot.com/ > > --- > Whereof one cannot speak, thereof one must be silent. > Ludwig Wittgenstein Thanks for the prompt reply, 7student and Robert =) But while transferring files, it does take a significant amount time though, so the primary reason does not lie in the arrray? If so, is there any way I can quicken the process of transferring files? -- Posted via http://www.ruby-forum.com/.