n2a
n2a copied to clipboard
Internal: Multithreading
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.