A Thursday 23 July 2009 21:17:17 escriguéreu:
[clip]
> > Well, if done properly, I/O in PyTables should not take much more than
> > numpy.memmap (in fact, it can be faster in many occasions).  You just
> > need to read/write arrays following the contiguous direction, i.e. the
> > most to the right among those orthogonal to the 'main' dimension (in
> > PyTables jargon).
>
> I think we are.
>
> The slow part of our code is a single line of Python:
> `numpy.dot(matrix, vector)`. `matrix` is a tall (thousands by 50)
> PyTables Array or CArray. `vector` is a row sliced out of it (1 by
> 50).

For better speed, you can try to read a *complete* row, and call 
numpy.dot(row, column) for every row in the matrix.  More optimizations can be 
done by reading several rows in one shot for computing several rows at once.  

HTH,

-- 
Francesc Alted

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to