How to speed up reading bytes from file?
Erno Kuusela
erno-news at erno.iki.fi
Fri Dec 6 15:26:18 EST 2002
In article <3df0e617$0$22235$a1866201 at newsreader.visi.com>,
grante at visi.com (Grant Edwards) writes:
| On any real OS, the disk buffering in the filesystem code will
| do that for you when you read single bytes. You can, however,
| avoid the user/kernel context switches by using mmap().
avoiding system calls does not necessarily result in much speedup at
least on linux, on my machine a system call takes about as long as
three python bytecode instructions.
-- erno
More information about the Python-list
mailing list