Implementing file reading in C/Python

Sion Arrowsmith siona at chiark.greenend.org.uk
Fri Jan 9 12:41:29 EST 2009


Grant Edwards  <invalid at invalid> wrote:
>On 2009-01-09, Johannes Bauer <dfnsonfsduifb at gmx.de> wrote:
>> I've come from C/C++ and am now trying to code some Python because I
>> absolutely love the language. However I still have trouble getting
>> Python code to run efficiently. Right now I have a easy task: Get a
>> file,
>If I were you, I'd try mmap()ing the file instead of reading it
>into string objects one chunk at a time.

You've snipped the bit further on in that sentence where the OP
says that the file of interest is 2GB. Do you still want to try
mmap'ing it?

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list