简体   繁体   English

性能调优库和Java 8流库

[英]Performance Tuning Libraries and Java 8 Stream Libraries

There are lots of java third party libraries are available for provide high performance in Java Collection. 有许多Java第三方库可用于在Java Collection中提供高性能。 According to this DZONE Article , there are some native libraries that follow OSGI model and provide high performance in Java Collection or also perform some others action. 根据这篇DZONE 文章 ,有一些本机库遵循OSGI模型,在Java Collection中提供高性能或者还执行其他一些操作。 Now in Java 8 the Streams are launched for provide good performance in collection libraries and we also perform some parallel actions using Streams . 现在,在Java 8Streams的推出是为了在集合库中提供良好的性能,我们还使用Streams执行一些并行操作。 Now, Following are my questions: 现在,以下是我的问题:

  1. Is Java Streams have better performance then third party libraries like Trove , Javolution etc. Java Streams是否具有比TroveJavolution等第三方库更好的性能。
  2. Is is possible to use Java 8 Streams with other collection libraries ? 是否可以将Java 8 Streams与其他集合库一起使用?
  1. Trove primitive collections even not a part of Java Collections Framework (the don't implement Collection , List , Map intefraces), though it doesn't prevent them from providing streams API in principle. Trove原始集合甚至不是Java Collections Framework的一部分(不实现CollectionListMap intefraces),尽管它并不妨碍它们原则上提供流API。

  2. Trove, Javalution and most other collection libs I'm keeping track of don't support efficient stream implementations yet. Trove,Javalution和我正在跟踪的大多数其他集合库不支持高效的流实现。 They don't override spliterator() method to return a Spliterator implementation which should override trySplit() method to take advantage of parallel stream features. 它们不会覆盖spliterator()方法以返回Spliterator实现,该实现应覆盖trySplit()方法以利用并行流功能。

  3. As I mentioned here: Java 8: performance of Streams vs Collections Streams are not a silver performance bullet, they may significantly help only if you haven't processed your huge collections in parallel yet , but don't have obstacles to do it using parallel streams. 正如我这里提到: Java的8:流的性能VS集合流是不是银色子弹的表现,他们可能会显著只帮助,如果你还没有处理您的并行巨大的收藏品还没有 ,但没有使用障碍平行做流。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM