efficient 'tail' implementation

Nick Craig-Wood nick at craig-wood.com
Thu Dec 8 15:30:04 CET 2005


Gerald Klix <Gerald.Klix at klix.ch> wrote:
>  As long as memory mapped files are available, the fastest
>  method is to map the whole file into memory and use the
>  mappings rfind method to search for an end of line.

Excellent idea.

It'll blow up for large >2GB files on a 32bit OS though.
-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list