-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
For example:
...
runPar $ do
...
fork f1 >> fork f2 >> fork f3 >> fork f4 >> fork f5 >> fork f6 >> fork f7 >> fork f8
fork f9 >> fork f10 >> fork f11 >> fork f12 >> fork f13 >> fork f14 >> fork f15 >> fork f16
...
On a quad-core processor, execution of forks will occur in the order of f1,f2,f3,f4,f16,f15,14,..., f5.
Thus, the time to execute f5 will reach when the remaining threads are processed.
This behavior can degrade performance and reduce parallelism due to the long wait for f5 results.
Metadata
Metadata
Assignees
Labels
No labels