This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Speed up array allocation


Jeff Sturm wrote:

> On 5 Jan 2001, Tom Tromey wrote:
> > Another choice would be to force every array to have the same
> > alignment.  I didn't want to do that since it wastes space.
>
> Really?  If you require all arrays to have double alignment, I figure you
> waste at most 4 bytes per array (on x86).  Is that really significant to
> some apps?  I personally would prefer the simplicity of uniform
> array alignment.

Once we get rid of sync_info the alignment will always be perfect on x86 (at
8 bytes). On a 64-bit ABI we'd waste 4 bytes per array where sizeof
(elementtype) <= 4. Probibly this is fairly insignificant in the 64-bit
context.

I'd agree that for speed and simplicity it would be desirable to do this, if
nobody comes up with a better solution. Presumably it would require changes
to the compiler though?

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]