Seek the one billionth line in a file containing 3 billion lines.

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Wed Aug 8 06:45:15 EDT 2007


On Wed, 08 Aug 2007 09:54:26 +0200, Méta-MCI \(MVP\) wrote:

> Create a "index" (a file with 3,453,299,000 tuples : 
> line_number + start_byte) ; this file has fix-length lines.
> slow, OK, but once.

Why storing the line number?  The first start offset is for the first
line, the second start offset for the second line and so on.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list