Skip to content

Conversation

@BobHanson
Copy link
Owner

performance could be better.

Test_J8_Speed map with 40,000 4-element ArrayLists flattened to one list
with 160,000 elements using:

map.values().stream().flatMap(c ->
c.stream()).collect(Collectors.toList())

   stream      for-loop

Chrome 182 ms 174 ms
FireFox 728 ms 396 ms
Edge 366 ms 186 ms

Java 14 ms 14 ms

So there is no real advantage without parallelism, I think. Still, it is
important to cover this.

  • arity worked out
  • static vs. nonstatic calling in functional interfaces worked out

performance could be better.

Test_J8_Speed map with 40,000 4-element ArrayLists flattened to one list
with 160,000 elements using:

map.values().stream().flatMap(c ->
c.stream()).collect(Collectors.toList())

       stream      for-loop
Chrome  182 ms      174 ms
FireFox 728 ms      396 ms
Edge    366 ms      186 ms

Java     14 ms       14 ms


So there is no real advantage without parallelism, I think. Still, it is
important to cover this.

- arity worked out
- static vs. nonstatic calling in functional interfaces worked out
@BobHanson BobHanson merged commit b516a19 into master Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants