MemoryError and Pickle
Steve D'Aprano
steve+python at pearwood.info
Mon Nov 21 19:59:50 EST 2016
On Tue, 22 Nov 2016 11:40 am, Peter Otten wrote:
> Fillmore wrote:
>
>> Hi there, Python newbie here.
>>
>> I am working with large files. For this reason I figured that I would
>> capture the large input into a list and serialize it with pickle for
>> later (faster) usage.
>
> But is it really faster? If the pickle is, let's say, twice as large as
> the original file it should take roughly twice as long to read the data...
But the code is more complex, therefore faster.
That's how it works, right?
*wink*
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list