GitHub user otaviojava opened a pull request:
https://github.com/apache/tinkerpop/pull/951
Optimizes Set with enum using the EnumSet implementation [tp32]
This PR replaces the HashSet implementation to
[EnumSet](https://docs.oracle.com/javase/7/docs/api/java/util/EnumSet.html)
that as its documentation says:
> A specialized Set implementation for use with enum types. All of the
elements in an enum set must come from a single enum type that is specified,
explicitly or implicitly, when the set is created. Enum sets are represented
internally as bit vectors. This representation is extremely compact and
efficient. The space and time performance of this class should be good enough
to allow its use as a high-quality, typesafe alternative to traditional
int-based "bit flags." Even bulk operations (such as containsAll and retainAll)
should run very quickly if their argument is also an enum set.
That is a continuation of the PR:
https://github.com/apache/tinkerpop/pull/948 that has the same benchmark value.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/otaviojava/tinkerpop tp32_enum_set
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/951.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #951
----
commit 68f069d6adfe99e6a4d5fa96b7b88c5137773626
Author: Otavio Santana <otaviopolianasantana@...>
Date: 2018-10-05T10:57:30Z
repleaces EnumSet to HashSet
----
---