Python example: possible speedup?
meow
meowing at banet.net
Thu Sep 9 17:08:13 EDT 1999
Fredrik Lundh <fredrik at pythonware.com> wrote:
> but sure, Python's standard file object is slow.
> working on a replacement (as an image processing
> guy, I've never understood why anyone ever used
> stdio), but there's so much code to write, and
> sooo little time....
It's not exactly general-purpose right now (there are still methods to
add), but I was able to get about an order of magnitude speed-up on
readline() by adapting the QIO functions from INN. In its current
form it probably won't work right on anything but Unix/Linux (I can
never remember what to do about those pesky line endings). FWIW,
readlines() is about neck and neck with the built-in
Anyway, it's only 10K and in C if anyone wants to play.
<URL:http://members.xoom.com/meowing/programs/qio.tar.gz>
More information about the Python-list
mailing list