At the JVM level an array of booleans is an array of bytes anyway, so:
- for a list, there's really no space (or performance) gain,
- for a Map<x, boolean> it's essentially the same as a set (unless you
mean to use it as a tri-state set, in which case map<x,byte> is
equivalent),
- for a Set<boolean> it's typically better to use a bitset.
- Map<boolean,x> is not really interesting :)
One could argue that a bitset could be used for maps or arrays, but
then it's really duplicating code and hiding the obvious (it's a
bitset!) behind some decoration layer, which was not what HPPC was
intended for.
Dawid
On Thu, May 8, 2014 at 10:24 PM, <
shaun....@gmail.com> wrote:
> Looking at com.carrotsearch.hppc.generator.Type, booleans seem to have been
> explicitly left out and I'm curious as to the reasoning.
>
> --
> You received this message because you are subscribed to the Google Groups
> "High Performance Primitive Collections for Java" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
>
java-high-performance-primi...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.