Parallel Streams
For Exercises 23.15–23.17, you may need to create larger data sets to see a significant performance difference.
23.15 (Summarizing the Words in a File) Reimplement Fig. 17.17 using parallel streams. Use the Date/Time API timing techniques you learned in Section 23.12 to compare the time required for the sequential and parallel versions of the program.
23.16 (Summarizing the Characters in a File) Reimplement Exercise 17.9 using parallel streams. Use the Date/Time API timing techniques you learned in Section 23.12 to compare the time required for the sequential and parallel versions of the program.
23.17 (Summarizing the File Types in a Directory) Reimplement Exercise 17.10 using parallel streams. Use the Date/Time API timing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access