efficient 'tail' implementation
bonono at gmail.com
bonono at gmail.com
Thu Dec 8 02:29:34 EST 2005
More information about the Python-list mailing list
Thu Dec 8 02:29:34 EST 2005
- Previous message (by thread): efficient 'tail' implementation
- Next message (by thread): efficient 'tail' implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Mike Meyer wrote: > It would probably be more efficient to read blocks backwards and paste > them together, but I'm not going to get into that. > That actually is a pretty good idea. just reverse the buffer and do a split, the last line becomes the first line and so on. The logic then would be no different than reading from beginning of file. Just need to keep the last "half line" of the reversed buffer if the wanted one happens to be across buffer boundary.
- Previous message (by thread): efficient 'tail' implementation
- Next message (by thread): efficient 'tail' implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list