[racket] performance problem in math/matrix

From: Berthold Bäuml (berthold.baeuml at dlr.de)
Date: Sun Jan 20 13:26:23 EST 2013

On 20.01.2013, at 19:14, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:

> 2013/1/20 Berthold Bäuml <berthold.baeuml at dlr.de>:
> 
>> With the ffi-binding example from Jens (thank you!) I get for the 1000x1000
>> multiply 450ms -- only 2x slower than Mathematica or Numpy. So integrating
>> such a binding in math/matrix looks promising.
> 
> Huh? I am surprised it is twice as slow.
> 
> Ah! The Numpy example uses floats and not doubles.

On my machine Numpy says it is using float64, hence, double.
 big1.dtype.name -> float64


>> Nevertheless, my original motivation for the little test was to get an impression of
>> what performance could be achieved in purely Typed Racket for numerical
>> algorithms. Would it in principle be possible to come close to pure C-code
>> performance (using the same algorithm) when using a floating-point-
>> implementation?
> 
> Let's try and write a matrix* that works for matrices represented as
> vectors of floats and see how fast it is.

Looking forward what is possible!

Berthold



> /Jens Axel

-- 
-----------------------------------------------------------------------
Berthold Bäuml 
DLR, Robotics and Mechatronics Center (RMC)
Münchner Str. 20, D-82234 Wessling
Phone +49 8153 282489
http://www.robotic.de/Berthold.Baeuml
 



Posted on the users mailing list.