Python IO performance?

John Roth johnroth at ameritech.net
Thu Jun 5 12:10:38 EDT 2003


"Jeff Epler" <jepler at unpythonic.net> wrote in message
news:mailman.1054820650.32406.python-list at python.org...
> On Thu, Jun 05, 2003 at 12:10:47PM +1000, Andrew MacIntyre wrote:
> > 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
> > hardware.
> >
> > So application developers who depend on maximising some aspect of
system
> > performance need to take matters into their own hands, as Perl does.
>
> .. another reason is that the OS I/O library must perform correctly
> under the range of circumstances described by whatever standard they
> conform to (eg POSIX, SuS, win32) under various circumstances
> (multithreading, binary-level structure compatibility),
> but the program-specific I/O library generally has fewer such
> requirements.

True, but since Python (and Perl) are more and more general-purpose
languages, their users expect that level of compliance unless specified
otherwise.

In any case, the basic issue here is that if it's really a major issue,
submit a PEP. Python already has operating system dependent
sections for file manipulations, for example. It's basically a matter of
convincing the BDFL and the core developers that having
operating system and architecture dependent file I/O routines
is beneficial. And that 's something that the core developers (a
notoriously overworked bunch of people that have my highest
admiration) need to make a decision on.

John Roth
>
> Jeff
>






More information about the Python-list mailing list