On 03/31/2013 01:52 PM, Charlie Kester wrote:
> I'd read the file one character at a time, counting newlines, until I
> reached the desired line. [..] Doing it this way avoids the need for a
> buffer altogether, along with any guessing about possible line lengths.
Reading is expensive. Loop through an optimally sized buffer and
incrementally count newlines.
Received on Sun Mar 31 2013 - 19:37:42 CEST
This archive was generated by hypermail 2.3.0
: Sun Mar 31 2013 - 19:48:05 CEST