[Gsll-devel] What is needed to fix matrix views?

Tamas K Papp tpapp at Princeton.EDU
Sat Apr 12 17:13:58 UTC 2008


On Sat, Apr 12, 2008 at 12:18:11PM -0400, Liam Healy wrote:

> >  Currently, the affine maps are not in FFA, but it appears that views
> >  in GSL need them.  If you need affine maps, let me know, I can whip up
> >  something on top of the current FFA (so even with these very general
> >  arrays, one could always access the underlying Lisp array if needed, I
> >  consider that an advantage).
> 
> For the type of affine map that GSL views support, would it be
> straightforward to support those views through FFA?  If so, go ahead
> and whip it up.

It would be straightforward to support them with a _layer_ over FFA,
but not inside FFA (because they would no longer be Lisp arrays).

To be honest, I don't really need views right now, and I have other
higher-priority things I am working on, so I am not interested in
writing something quick and dirty at the moment.

> Right, this was my motivation for skipping over them in the first
> place.  As I said before,  I didn't even bother to figure out if they
> would work.  They just seemed unimportant.  I think native arrays via
> SBCL are more important, so that's what I've been focusing on (to the
> extent that I've had time to work on GSLL).

I agree with your original evaluation - views are not that important,
a pain in the ass to integrate, so we should be focusing on other
stuff first.  I would not mind ignoring views altogether (ie simply
not implementing those functions that need views) for the short or
medium run.

But I am probably biased.  I am using GSLL for the
functions/algorithms which are a pain in the ass to implement and
debug in any language, so I just want to use versions somebody else
wrote. For example, special functions like erf of the gamma function,
splines, multivariate optimization, etc.

I think views are used because of optimization, to avoid copying.  My
experience is that copying is fast and is generally not a hot spot in
the programs I write.  So I am not interested in implementing
something that would lead to a 0.1% speed improvement in my programs,
but would entail the loss of the ability to use native Lisp arrays
seamlessly and also a huge amount of unnecessary debugging and
scaffolding code.

I also understand that other users may need views in GSLL.  But before
embarking on a project to integrate them, I would like to see some
real-world application where the profiling says that views would save
a lot (at least 10%) of runtime, and it is not possible to do it by
other means (reorganizing data structures, displaced arrays, etc).

Tamas



More information about the gsll-devel mailing list