HPPC vs FastUtil?

472 views
Skip to first unread message

Matthew O'Connor

unread,
Dec 29, 2011, 1:10:42 PM12/29/11
to High Performance Primitive Collections for Java
Hi,

I just stumbled across HPPC. I've been using FastUtil for some time
and wondered:

What's the design space/differences/tradeoffs that motivated HPPC vs
FastUtil or other primitive collections?

I read the HPPC Motivations page, but from what I understand FastUtil
is motivated by similar desires - fast, small primitive collections.

Thanks,
Matt

Dawid Weiss

unread,
Dec 29, 2011, 3:15:18 PM12/29/11
to java-high-performance...@googlegroups.com
Hi Matt,

Originally the need for HPPC was motivated by the fact that fastutil
was LGPL licensed and this was a no-no license from many commercial
customers that we have at Carrot Search (the discussion of whether
they are right or wrong is beyond the scope here).

There are still some design differences -- HPPC has public access to
internal buffers and fields so you can fiddle and hack around with
internals at runtime without the need for copying (which is a good or
bad feature, depending on what you need). We also use assertions only
for checks so things may go out of bounds (fastutil has fixed tests).
Finally, we don't strive to make HPPC compatible with Java collections
interfaces.

Fastutil is a great library, we like it very much. It is also as fast
as HPPC these days (because we use nearly identical code and actively
exchange ideas). I would try both and see which fits your taste better
:)

Dawid

Reply all
Reply to author
Forward
0 new messages