Part that runs way too slow:

chrono.begin();
for(int i=0; i<nombremult; i++)
res = prod(m,n);


if(chrono.elapsed()<1000)
fileoutput << chrono.elapsed() <<  " " << chrono.elapsed_micro() << " ";
else
fileoutput << chrono.elapsed() <<  " " << 0 << " ";


}

This goes far faster on visual than on xcode.

Le 30 juin 2010 à 18:09, Christopher Jefferson a écrit :


On 30 Jun 2010, at 16:55, Raphaël Amiot wrote:

Hello there.

I am implementing matrix multiplication and am trying to have my stuff run as fast as possible.
But then I noticed something strange.
Using Xcode,

resultmatrix = prod(matrix1,matrix2);

is 10 to 16 times slower (with 100x100 matrixes) than simply doing something like that:


for(...)
for(...)
for(..)
multiply_things();

And 20 to 40 times slower than a simple threaded approach.


Using visual studio, it's 2 times faster than naive multiplication.


This is on a release build, with
#define BOOST_UBLAS_NDEBUG 1
#define NDEBUG 1

So what gives?_______________________________________________

Could you provide a small complete program which shows your problem?

Chris

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users