This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Multiply Matrix in GSL


Hi:
I used MingW GCC 2.95 and VC 6.0 for testing.
The only compilation option is O2.
This is default option for VC Release version.
Yes, I use gsl_blas_dgemm, and I will try ATLAS later.
Because I use the same code on all testing platforms, I don't think the
reason is range checking.
I guess the reason maybe memory pointer moving and cache.

Thank you very much.

Liu, Li

-----Original Message-----
From: Brian Gough [mailto:bjg@network-theory.co.uk]
Sent: Sunday, March 17, 2002 5:46 AM
To: Liu, Li
Cc: gsl-discuss@sources.redhat.com
Subject: Re: Speed Problem with GSL VC Version


Liu, Li writes:
 > Hi:
 > I have implemented a matrix multiplication program with some GSL Matrix
 > functions.
 > My Matrix' size is 500 * 500.
 > At Linux, it takes only 0.8 seconds, and SAS takes 3.1 seconds.
 > At PC, SAS still takes 3.1 seconds, but my program takes 3.7 seconds!
 > I already modified the result with the different CPU speeds of two
machines.
 > Is there so huge difference for GSL between Unix and Win32?

I expect the difference is due to different compilation options.

You didn't mention what function you used to multiply the matrices
though, so I can't say which options are involved, but it is probably
those for inlining and runtime range-checking.

The recommended matrix-multiply function in GSL is the BLAS function
gsl_blas_dgemm -- it can be replaced by the high-performance ATLAS
library if it's not fast enough.

regards,
Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]