primitive collections....which is best?

Discussion in 'Java' started by alejandrina, Jan 10, 2007.

  1. alejandrina

    alejandrina Guest

    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
     
    alejandrina, Jan 10, 2007
    #1
    1. Advertising

  2. 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.
     
    Ralf Wiebicke, Jan 10, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?S=F8ren_Bak?=

    Collections API for primitive types

    =?ISO-8859-1?Q?S=F8ren_Bak?=, Aug 27, 2003, in forum: Java
    Replies:
    0
    Views:
    421
    =?ISO-8859-1?Q?S=F8ren_Bak?=
    Aug 27, 2003
  2. Doug Poland
    Replies:
    9
    Views:
    763
    VisionSet
    Sep 27, 2003
  3. Replies:
    7
    Views:
    627
    Victor Bazarov
    May 9, 2005
  4. Daniel Pitts
    Replies:
    7
    Views:
    518
  5. mutex
    Replies:
    0
    Views:
    230
    mutex
    Jul 27, 2003
Loading...

Share This Page