-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Pascal,

I would think that a good programmer can often optimise better for a
specific problem than a general purpose library would. For example I
implemented a peak search for diffraction images which is about an
order of magnitude faster than ImageMagick based on the same idea (it
took me two weeks, though ;-) ).

I am surprised you suggest a library for trigonometric functions - I
thought that for long intel CPUs have a special coprocessor for those
and that compilers would directly make use of this.

Best,
Tim

On 05/09/2014 05:38 PM, Pascal wrote:
> Le 09/05/2014 15:36, Adam Ralph a écrit :
>> 
>> Can it be parallelized? That is how you reduce run-time. One of
>> the tests matrix-matrix multiplication has been successfully
>> speeded up by using GPUs.  CUDA is the language used for this,
>> which is a derivative of C. To be fair you only see the benefit
>> for really large matrices, smaller ones which actually be slower
>> on GPUs.
> 
> Talking about matrix multiplication, the benchmark is biased as
> they used openblas. The core multiplication is done in assembly. So
> it's probably machine code rules!
> 
> mathematica and octave probably use mkl, same as openblas. This is
> the reason why fortran, C, julia, mathematica and matlab perform
> the same. They are all linked to mkl or openblas.
> 
> There is a fantastic link on the optimization on general matrix
> matrix mutiplication: 
> <http://wiki.cs.utexas.edu/rvdg/HowToOptimizeGemm>
> 
> Python uses numpy which is a wrapper around lapack aka fortran...
> Same for R. I think octave too.
> 
> One general advice to give would be not try to optimise, use a
> library instead.
> 
> openblas/mkl/acml for linear algebra fftw for fourier transform 
> sleef for trigonometric functions and other math functions mixmax
> for random numbers And so on...
> 
> Pascal
> 

- -- 
- --
Dr Tim Gruene
Institut fuer anorganische Chemie
Tammannstr. 4
D-37077 Goettingen

GPG Key ID = A46BEE1A

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iD8DBQFTbPn1UxlJ7aRr7hoRAjB4AKDs2uzifBDUSkR6I2b3TS4tyXBi4gCgj7fl
5y50f32US65Wqggku1dRR4Y=
=Od8Y
-----END PGP SIGNATURE-----

Reply via email to