Created
August 9, 2020 05:27
-
-
Save AnkitKiet/6c1f5cd57a476a02bc6bdf43fab676f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Benchmark | |
public void C3_hugeListStreamPartitioned() { | |
final List<List<Integer>> result = list.stream() | |
.collect(partitioned(chunkSize)); | |
assertThat(result).hasSize(expectedSize); | |
assertThat(result.get(chunkIndex)).isEqualTo(expectedChunk); | |
} | |
@Benchmark | |
public void C4_hugeListToPartition() { | |
final List<List<Integer>> result = Partition.ofSize(list, chunkSize); //Here Using Custom Partition Class | |
assertThat(result).hasSize(expectedSize); | |
assertThat(result.get(chunkIndex)).isEqualTo(expectedChunk); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment