----- Original Message ----- From: "Hope, Matthew" <[EMAIL PROTECTED]> To: "'Jakarta Commons Developers List'" <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 10:26 AM Subject: RE: [primitives] Open for business
> perhaps less so from 1.5 onwards since for non critical performance the ease > of autoboxing is hard to beat but when you are using primitives not just > because of other interface concerns but for performance/space considerations > a pure primitive implementation should be considerably better for large > sizes. An array of int[1000000] for example takes up 4 bytes per entry* > verses an Object array of Integers which takes 20 bytes per entry on > average. > > This is 5 times the space! When you use short[] vs Short the difference is a > factor of 10 All of boolean, byte, short, int, object reference and float use the same space in JVM (4 bytes) double and long are 8 bytes. And all of primityve wrappers have single primityve field, objects can use some internal JVM data structures, but I do not think factor can be 10, how do you tested it ? > > given that the underlying implementation of IntArrayList will almost > certainly be an array of ints this makes a lot of sense if you care about > the size of your memory footprint... > > Matt > > * all done on windows 1.3.1 JVM - some jvms may do things differently YMMV > > > -----Original Message----- > > From: Yoav Shapira [mailto:[EMAIL PROTECTED] > > Sent: 02 September 2003 03:49 > > To: Jakarta Commons Developers List > > Subject: Re: [primitives] Open for business > > > > > > Howdy, > > I may have missed the original discussion, but is primitives > > going to have > > much of a market given the relative proximity of JDK 1.5 with its > > autoboxing features? Or are there a bunch of features > > planned that aren't > > going to be in JDK 1.5 anyways? > > > > Yoav Shapira > > > > On Tue, 2 Sep 2003, Stephen Colebourne wrote: > > > > > The [primitives] project has been created and is now ready > > for discussion, > > > debate and coding. > > > > > > At present, I have NOT removed anything from [collections]. > > I believe that > > > there may be people with dependencies on the primitive code > > there. I do not > > > plan to release that code however, nor will its prescence block a > > > [collections] release. I think that this will probably be > > the position until > > > [primitives] is ready. > > > > > > So... lets try to get [primitives] sorted ;-) > > > > > > Stephen > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > ************************************************************************** > The information transmitted herewith is sensitive information intended only > for use by the individual or entity to which it is addressed. If the reader > of this message is not the intended recipient, you are hereby notified that > any review, retransmission, dissemination, distribution, copying or other > use of, or taking of any action in reliance upon this information is > strictly prohibited. If you have received this communication in error, > please contact the sender and delete the material from your computer. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]