BenLangmead / bowtie2

A fast and sensitive gapped read aligner
GNU General Public License v3.0
664 stars 158 forks source link

Add back the condition_variable based LockedQueue for low-thread setups #491

Open sfiligoi opened 2 weeks ago

sfiligoi commented 2 weeks ago

On small thread count, the polling LockedQueue add substantial overhead to bowtie2, so we revert back to using the lightweight condition_variable based solution there. See #465 for details.

We keep the polling, lock-free version for higher thread counts, to avoid excessive contention on the lock. See #437 for details.

sfiligoi commented 2 weeks ago

@ch4rr0 I put a hardcoded cut at 16 threads, since I see CV scaling great at least to that concurrency for my purposes.

i am open to suggestions on improving the logic on when to use CV vs MC.