Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2454

Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time.

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.help
Subject Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time.
Date 2013-01-15 09:07 -0500
Organization A noiseless patient Spider
Message-ID <kd3nqk$qm8$1@dont-email.me> (permalink)
References (1 earlier) <atKIs.36232$TH3.9358@newsfe12.iad> <fcf46194-fde7-4096-b2d1-490586ccb83a@googlegroups.com> <kd1v4d$u9n$1@dont-email.me> <2c39444f-5585-4373-a851-6c5aeefa21b3@googlegroups.com> <9e7b5131-a40b-4487-9173-c8c886a99b9d@googlegroups.com>

Show all headers | View raw


On 1/14/2013 11:04 PM, GCRhoads@volcanomail.com wrote:
> On Monday, January 14, 2013 11:00:14 PM UTC-5, gcrh...@volcanomail.com wrote:
>> On Monday, January 14, 2013 4:59:38 PM UTC-5, Eric Sosman wrote:
>>  [...]
>>> If not, why do you care where the objects happen to reside?
>
>> I care because it has a large effect on the efficiency of the program.  With contiguous memory locations, the program's memory accesses will have a very high locality of reference resulting in a much faster average memory access time due to the computer's memory cache.
>
> Also, garbage collection shouldn't be a problem in this case because there won't be any.  All the memory gets allocated at the beginning of the program and everything remains accessible throughout the entire execution of the program.

     "There won't be any" is almost certainly wrong, but "there
won't be much" might be correct.  If so, the objects' memory
areas are likely to stay in their original locations, pretty
much, which means they're likely to be in only a few contiguous
regions.  If they're all created on the same thread, "a few" is
likely to be "one."

     If "likely" and "almost certainly" and "pretty much" aren't
good enough, then again: You're using the wrong language.

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Array of a Class Type that contains an array where the sizes of the array are not known at compile time. GCRhoads@volcanomail.com - 2013-01-13 17:38 -0800
  Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-01-13 18:56 -0800
    Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. GCRhoads@volcanomail.com - 2013-01-14 13:36 -0800
      Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-01-14 16:59 -0500
        Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. GCRhoads@volcanomail.com - 2013-01-14 20:00 -0800
          Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. GCRhoads@volcanomail.com - 2013-01-14 20:04 -0800
            Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Patricia Shanahan <pats@acm.org> - 2013-01-14 23:44 -0800
            Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-01-15 09:07 -0500
          Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-01-15 09:06 +0200
          Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-01-15 08:32 -0500
          Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Lew <lewbloch@gmail.com> - 2013-01-15 11:19 -0800
          Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Joshua Cranmer <Pidgeot18@verizon.invalid> - 2013-01-15 13:52 -0600
      Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Roedy Green <see_website@mindprod.com.invalid> - 2013-01-15 20:56 -0800
  Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. markspace <markspace@nospam.nospam> - 2013-01-13 19:01 -0800
    Re: Array of a Class Type that contains an array where the sizes of the array are not known at compile time. Lew <lewbloch@gmail.com> - 2013-01-13 21:39 -0800

csiph-web