As other monks have shown, the primary problem with your code is disk contention. You also say that your code is cpu bound. What I would do is handle all file IO in one thread and hand the data off to multiple threads to process.
In reply to Re: Reading from file in threaded code is slow
by Anonymous Monk
in thread Reading from file in threaded code is slow
by amcglinchy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |