Quote Originally Posted by dukevn View Post
OK here is the reports with an input file of 1.06GB on a cluster node of 8 cores:

- Original code: 36m2.169s
- Improved v.1 code: 12m40.918s
- Improved v.2 (without XMax): 11m39.172s
- Final code v.3 (without string stream): 11m35.974s

So there is no much difference between the last three versions (but three times as fast as the original one - a great improvement).
My guess is that code like that should execute at the speed of file I/O.
I know I can copy a 1GB file in about 30 seconds, so 11 minutes sounds like WAY too much.
Could you comment out everything in your code except for I/O and see how long that takes?
Do you mind posting your code and a sample data file?