in reply to Multithreading a large file split to multiple files
Can I make it run on multiple cores so it runs faster?
Short answer: no.
The logic of your code dictates the records in the input file are read in strict first to last sequence. Thus, any overhead from switching threads or sharing state is additional time to that required for processing.
Even the code towards the end of the loop, is dependent on state changes earlier in that loop.
And with 15GB of input, there isn't even any mileage in accumulating output in memory to avoid disk thrash.
It's doubtful if even MCE can help you with this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multithreading a large file split to multiple files
by Marshall (Canon) on May 15, 2018 at 08:53 UTC | |
by 10isitch (Initiate) on May 15, 2018 at 14:53 UTC |