You're optimizing too soon!
First make your code *work*, then if it's not fast enough, profile it to find out what's too slow. Then, and *only* then, make it work fast. If you did this, you would've simply used normal line-by-line entry. Then you wouldn't have started down this trail, since the normal line-by-line file reading is already buffered and fast.
Until you know what's "slow", making something faster is a waste of time. For example if you have a program that's too slow, and the file reading is taking 5% of your time, then improving the file reading will get you a 5% speed increase *at best*! You'd profit more by speeding up whatever is consuming the other 95% of your time...
...roboticus
In reply to Re: Line by line buffered read
by roboticus
in thread Line by line buffered read
by muyprofesional
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |