开发者

Most efficient Java primitive collections library [closed]

开发者 https://www.devze.com 2023-01-08 04:00 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

开发者_开发技巧

Closed 8 years ago.

Improve this question

What is the best Java primitive collections library? (most memory and time efficient)

I've found Trove and FastUtil to be the most used ones, but haven't found much comparison between them (or between others)

Is there any comparison available?


This comparision between Java standard collections, Trove and Colt might be helpful.


I am not aware of any good primitive-only framework benchmark. This one would be nice to see, as well as to compare with non-primitive versions (just to show how epically Java generics with autoboxing suck in some hardcore cases).

There's a benchmark from the Trove itself, I think the most straightforward way is to port it to couple of other libraries.

Also - not sure you've seen that one - Cern's Colt library had primitive lists and matrices even before trove emerged AFAICR.


I recently open sourced Banana, which is another primitives collections java library. the difference than the other libraries is that Banana got it's own memory management, which basically allow it to implement any dynamic data structure without creating many objects. Banana is also much smaller than many of the other libraries, jar is around 60k at the moment.

It already support a LinkedList, which I don't think any other primitive collections library is providing, and I plan to add a Set and a Tree soon.

https://github.com/omry/banana

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号