N x Q model, source splittability, boxing, ordered operations, common-pool starvation, and parallel-stream correctness bugs. Captured output in output/. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6hCTuFrQT8xKmmMrF
16 lines
406 B
Plaintext
16 lines
406 B
Plaintext
1. forEach(list::add), n = 100000, ten runs (-1 = exception):
|
|
sizes: 90126 86309 22551 86194 -1 22732 87868 10443 15012 77596
|
|
collect(toList()) size: 100000
|
|
|
|
2. reduce(10, Integer::sum) over 1..100
|
|
sequential: 5060
|
|
parallel : 5210
|
|
|
|
3. reduce(0, (a, b) -> a - b) over 1..1000
|
|
sequential: -500500
|
|
parallel : 0
|
|
|
|
4. counter[0]++ in forEach, n = 100000
|
|
racy : 99997
|
|
atomic : 100000
|