n2a icon indicating copy to clipboard operation
n2a copied to clipboard

Internal: Multithreading

Open frothga opened this issue 5 years ago • 0 comments

A simple approach to multithreading would be to put a mutex on the list of objects attached to the current event and have n threads (probably equal to the number of hardware threads) take work from it. If the cost of contention relative to the cost of the work is 1/n or less, then contending for the mutex won't slow the simulation too much. It's worth a try.

frothga avatar Mar 13 '20 11:03 frothga