[SciPy-user] io.read_array slow

Christian Kristukat ckkart at hoc.net
Fri Sep 16 07:11:46 EDT 2005


Travis Oliphant wrote:
> Christian Kristukat wrote:
> 
>>
>> Hi,
>> I noticed that io.read_array is really slow compared to a python 
>> while/readline/split loop (about 5 times slower). I believe to 
>> remember that at some time it was written in C but when I looked at 
>> the source of scipy 0.3.2 it seems to be pure python. Is there a 
>> evident reason why it must be that slow or are there maybe plans to 
>> rewrite it in C?
> 
> 
> It's slower because it does more, than that simple loop.    The old 
> complexity-speed trade off.  No doubt there are optimizations that can 
> be done.  If you find any, please let us know...

I try to do so if I find the time. But where did the old C-code go? Or do I 
remember wrong?

> Notice that the new scipy core ndarray object has a builtin (simple) 
> ascii file reader for each type.  This will be very fast for simple 
> cases, but still is not perfect.

Does 'the new scipy_core' mean it should be in the current svn version? I didn't 
find an ndarray there.

Regards, Christian





More information about the SciPy-User mailing list