3 ms·
Your example implies some combination of (a) excessive data sharing between threads (b) possible need for core pinning. If thread A is going to need to read al
by PaulDavisThe1st 4y ago
Your example implies some combination of (a) excessive data sharing between threads (b) possible need for core pinning.
If thread A is going to need to read all the data touched by thread B, then it's unclear why you've split the task across threads. If there are still good reasons, then probably pin A and B to core N (never pin anything to core 0, unrelated story), and let them interleave there.
If that doesn't make sense, then yep, you'll have to face the cost of ping-ponging.