tail

Cameron Simpson cs at cskk.id.au
Mon Apr 25 18:54:55 EDT 2022


On 25Apr2022 08:08, DL Neil <PythonList at DancesWithMice.info> wrote:
>Thus, the observation that the OP may find that a serial,
>read-the-entire-file approach is faster is some situations (relatively
>short files). Conversely, with longer files, some sort of 'last chunk'
>approach would be superior.

If you make the chunk big enough, they're the same algorithm!

It sound silly, but if you make your chunk size as big as your threshold 
for "this file is too big to read serially in its entirety, you may as 
well just write the "last chunk" flavour.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list