Just before using MSVC++ input.getline() to read a very big (3GB) delimited text file, I wanted to optimize the speed, incrementing the size of the input buffer:
ifstream input("in1.txt");
input.rdbuf()->pubsetbuf(NULL, 1024 * 1024);
However, when executing the code, the speed did not improve, so I would like to know:
- What is wrong in the code?
- Does buffering works with ifstream.getline?
- What is the size of the default buffering assigned to ifstream?
Regards.