Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > primitive collections....which is best?

Reply
Thread Tools

primitive collections....which is best?

 
 
alejandrina
Guest
Posts: n/a
 
      01-10-2007
Hi all,

We are revamping some packages that use one of the primitive
collections out there (pcj.sourceforge.net) but we know there are
others, for example, the Trove library).

Any recommendations or insights? Is it worth switching? Any clear
preferred package?

Also, we did think about replacing the primitive collections with the
5.0 boxin/unboxing + generics, but from all we've seen the performance
penalties are too great. So we stick with the primitives...

Thanks for any insights

Alejandrina

 
Reply With Quote
 
 
 
 
Ralf Wiebicke
Guest
Posts: n/a
 
      01-10-2007

Hi!

I do use pcj for my project. Some time ago I tried to switch to trove, but
it lacked some of the less often used methods (retainAll), which I needed.

Currently I really miss the equivalent of LinkedHashMap for primitives,
which pcj and trove (AFAIK) do not implement.

One of bigger performance advantages of pcj and trove is the use of open
hashing instead of chained hashing. See the docs of pcj for an explanation.
pcj offers both open and chained hashing, trove offers open hashing only,
JCF (java.util.*) offers chained hashing only.

And trove offers generics (for instance for Integer-Object maps), pcj does
not.

Best regards,
Ralf.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default primitive values from primitive Class<?> object. Daniel Pitts Java 7 10-23-2008 04:30 PM
How to cast object to primitive array? antonyliu2002@yahoo.com ASP .Net 3 04-08-2006 07:33 PM
Primitive vs. non-primitive l-value richardclay09@yahoo.co.uk C++ 7 05-09-2005 02:52 PM
ObjectDataSource non-primitive data fields DoesDotNet ASP .Net 2 04-22-2005 05:33 PM
How to pass other than a primitive type as a property of a custom control? Henri ASP .Net 0 05-17-2004 02:41 PM



Advertisments