primitive collections....which is best?

A

alejandrina

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
 
R

Ralf Wiebicke

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
Martindap

Latest Threads

Top