Dot product - SSE2 vs BLAS

Dot product - SSE2 vs BLAS

What's my best bet for computing the dot product of a vector x with a large number of vectors y_i, where x and y_i are of length 10k or so.

  1. Shove the y's in a matrix and use an optimized s/dgemv routine?
  2. Or maybe try handcoding an SSE2 solution (I don't have SSE3, according to cpuinfo).

I'm just looking for general guidance here, so any suggestions will be useful.
And yes, I do need the performance. Thanks for any light.

Actionscript 3 import package.* vs import package.Class


Optimizing Kohana-based Websites for Speed and Scalability
I think GPUs are specifically designed to perform operations like this quickly (among others).

When is an object in Javascript constructed?
So you could probably make use of DirectX or OpenGL libraries to perform the vector operations.

Which conditional statement is faster in SQL?
D3DXVec2Dot This will also save you CPU time..
Is there a way to load embedded YouTube videos faster on my website?

Optimizing bitwise filtering in SQL

Does avoiding functions increase the performance?


Slow implementation and runs out of heap space (even when vm args are set to 2g)
Alternatives for optimised BLAS routines:.
  • If you use intel compilers, you may have access to intel MKL
  • For other compilers ATLAS usually provides nice performance numbers


Handcoding a SSE2 solution is not very difficult and will bring a nice speedup over a pure C routine.

How much this will bring over a BLAS routine must be determined by you.. The greatest speedup is derived by structuring the data into a format, so that you can exploit data parallelism and alignment.



I use a GotoBLAS.

It's the hight perfomance kernel routines.

The many times better than MKL and BLAS..


The following provides BLAS level 1 (vector operations) routines using SSE.

. If you have an nVidia graphics card you can get cuBLAS which will perform the operation on the graphics card.

. For ATI (AMD) graphics cards.

82 out of 100 based on 52 user ratings 502 reviews