[Tutor] Load Entire File into memory

Oscar Benjamin oscar.j.benjamin at gmail.com
Tue Nov 5 14:22:11 CET 2013


On 4 November 2013 17:41, Amal Thomas <amalthomas111 at gmail.com> wrote:
> @Steven: Thank you...My input data is basically AUGC and newlines... I would
> like to know about bytearray technique. Please suggest me some links or
> reference.. I will go through the profiler and check whether the code
> maintains linearity with the input files.

Amal can you just give *some* explanation of what you're doing?

I can think of many possible ways to optimise it or to use less memory
but it depends on what you're actually doing and you really haven't
given enough information.

If you show a short data sample and a short piece of code that is
similar to what you are doing then people here would be in a better
position to help. Please read this: http://sscce.org/

You have repeatedly made claims such as "X is faster than Y" but
you've also said that you are a beginner to Python. Be aware that
testing speeds on a small file is completely different from testing on
a large file or that testing speeds on a file that is already cached
by the OS is completely different from testing on one that is not.
There are many things that can make the difference.


Oscar


More information about the Tutor mailing list