My first reaction is that I'd use 3 threads.
I'd use a high/low water marking system to allow threads to yield their timeslices once the queue they were feeding moved above the high water mark, until it dropped back to the low watermark. Reading threads would yield when their input queues dropped below low water.
Then run some benchmarks to establish the best values for the watermarks.
In reply to Re: faster with threads?
by BrowserUk
in thread faster with threads?
by js1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |