Python IO performance?

Andrew MacIntyre andymac at
Thu Jun 5 04:10:47 CEST 2003

On Thu, 4 Jun 2003, Bengt Richter wrote:

> >* Perl uses OS-specific FILE* hacks for speed; Python mostly sticks with
> >simple, portable calls.
> IMO if the latter does not result in max disk thoughput for simple IO, there is
> room for improvement in the OS event/scheduling/dispatching and/or the interface(s) to it.
> Not that that helps Python per se ;-/

It is a not uncommon misconception that OS library routines are highly
optimised for performance.  OS suppliers, particularly those supporting
multiple archictectures, frequently prefer portability over performance.
Even within an architecture, say i386, maximising performance requires
CPU specific tricks, and in a binary distribution some reasonable
compromise must be reached to perform satisfactorily across a range of

So application developers who depend on maximising some aspect of system
performance need to take matters into their own hands, as Perl does.

Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at  (pref) | Snail: PO Box 370
        andymac at             (alt) |        Belconnen  ACT  2616
Web:               |        Australia

More information about the Python-list mailing list