[SciPy-user] complex vector scalar product: wrong implementation
Fernando Perez
Fernando.Perez at colorado.edu
Wed Jan 12 21:23:02 EST 2005
Robert Kern wrote:
> 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 don't think that there would be a performance hit by making
> dot/innerproduct do a conjugation. dot has to dispatch on the typecodes
> in any case. It should just be a matter of changing a couple signs in
> the complex case (or calling the appropriate BLAS functions for dotblas).
Well, if it could really be done with no measurable performance hit at all,
then I'd be all for a 'mathematically correct' inner/dot. But I'd like to see
that shown by measurement, across a large set of sizes. Maybe you're right,
I'm just being a bit picky :)
Cheers,
f
More information about the SciPy-User
mailing list