If you are writing something involving the math between vectors in C/C++, you may want to check out Vlfeat (http://vlfeat.org). It is designed to be a library for Computer Vision related stuff, but it also bring you a wrapper for SSE2 acceleration for vector computation. Say your original code for the calculation of vectors product