[SciPy-user] complex vector scalar product: wrong implementation
Vladimir A. Roudnev
vroudnev at ksu.edu
Wed Jan 12 23:41:50 EST 2005
Fernando Perez wrote:
> There is one important reason to want to have pure non-conjugating
> functions: performance. If you are writing code which is using purely
> real arrays, and dot/inner are at the center of your critical path,
> you do NOT want constant type checks or no-op conjugations to be
> taking place. Now, I am not arguing that the current choice of names
> was a good one, but there is a very valid reason for having an
> explicitely, purely real set of functions.
I strongly disagree with the performance argument. Performance problems
rise when dealing with big arrays that are not supposed to be processed
in python, but with a native method. It is the high-level language
(Python) library which is responsible for choosing the right
native method to call. For big arrays type-checking is (OK, expected to
be) a relatively fast operation, and the proper BLAS call (xDOT or
xDOTC, or xDOTU when appropriate) must be made on the base of this fast
type-checking procedure.
BW,
VR
More information about the SciPy-User
mailing list