[racket] performance problem in math/matrix

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Jan 20 13:14:56 EST 2013

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.

> 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.

/Jens Axel


Posted on the users mailing list.