skip progress output if another thread is printing
With a large number of threads, progress output becomes increasing spammy and contention on the print lock can begin to degrade runtime. Since progress output itself is non-critical, simply suppress it when the print lock is held by another thread. It's no longer relevant to experiment with replacing this with a spinlock. Some cursory experiments indicated this did not affect performance on mid-size machines. On large machines a spinlock is likely to perform worse than a pthread mutex, that we expect has already been optimised for large machine scenarios. Github: closes #160 "replace print mutex with a spinlock?"
parent
deac79f5
Please register or sign in to comment