Author pitrou
Recipients amaury.forgeotdarc, beazley, christian.heimes, donmez, georg.brandl, giampaolo.rodola, pitrou, rhettinger, wplappert
Date 2008-12-16.13:56:14
SpamBayes Score 1.92079e-09
Marked as misclassified No
Message-id <1229435769.10551.10.camel@localhost>
In-reply-to <1229435274.27.0.485202136997.issue4561@psf.upfronthosting.co.za>
Content
> I know that as hard as it might be for 
> everyone to believe, there are a lot of people who crank lots of non-
> Unicode data with Python.

But "cranking data" implies you'll do something useful with it, and
therefore spend CPU time doing those useful things (likely much more CPU
time than you spent read()ing the data in the first place).

In any case, you can try to open your file in unbuffered mode:
    open("foobar", "rb", buffering=0)

it will bypass the Python buffering layer and will go directly to the
raw C unbuffered object.

> (e.g., okay, they work with bytes instead of 
> strings, but is the bytes type really all that different from the old 
> Python 2 str type?)

No. It's a bit more limited, doesn't support autoconversion to/from
unicode, but that's all.
History
Date User Action Args
2008-12-16 13:56:16pitrousetrecipients: + pitrou, georg.brandl, rhettinger, beazley, amaury.forgeotdarc, giampaolo.rodola, christian.heimes, donmez, wplappert
2008-12-16 13:56:15pitroulinkissue4561 messages
2008-12-16 13:56:14pitroucreate