file handling - reading big data in C++ -
im using c++ read large files on 30000 lines , 3000 colums. (30000 x 3000) matrix. im using 2d vector push read data. need process couple of times. there way optimize reading process?
i give ideas not exact solution. because not know full details of system.
- actually if have big file data , data change in next reading. try use data base methodology.
- for performance can use concurrent file reading (read same file part part using multiple thread).
- if need process data well, use separate thread(s) process , may possible link queue or parallel queues.
- if data length fixed (such fix length numbers). , if know changed location, try read changed data instead of reading , processing whole file again , again.
- if of above not helped use memory mapping methodology. if looking portability, boost memory-mapped files support reduce works
Comments
Post a Comment