Have a look at GNU Trove:

http://trove4j.sourceforge.net/html/overview.html 
<http://trove4j.sourceforge.net/html/overview.html>

https://bitbucket.org/trove4j/trove/src/master/ 
<https://bitbucket.org/trove4j/trove/src/master/>

It offers hash maps and array collections for all primitives.

The stable version 3.0.3 is from 2012 and I’ve used this without any issue for 
years.

I do not know about recent development. It is on maven as this artefact.

https://search.maven.org/search?q=g:net.sf.trove4j 
<https://search.maven.org/search?q=g:net.sf.trove4j>



> On 7 Jun 2019, at 20:53, Xeno Amess <xenoam...@gmail.com> wrote:
> 
> Recently I feel like sometimes ArrayList<Integer> or HashSet<Integer> is
> just...too slow.
> If we implement the datas tructures in primitive types and offer some
> functions to fit the common interfaces, I really think that can help.
> Sorry for my poor english, but you can get what I mean at
> https://github.com/XenoAmess/commonx/tree/master/src/main/java/com/xenoamess/commons/collections/list/primitive_array_lists
> 
> 
> *LongArrayList score : 12399758ArrayList<Long> score : 27851927*
> 
> According to the test result, sometimes it will run more than 1 times
> faster when we use primitive such data structures...
> I just wonder:
> 1.  Is this thing done by some libraries before?
> 2. Are there any guys who are as interested with such things as me? (as I
> don't think I can fo this translation of codes completely by myself.)
> 3. If 1->false , then will there be any possibility that apache do such
> things?(either clean room implementations or translation?)
> Thx..
> -----XenoAmess.

Reply via email to