[plt-scheme] More PLT Scheme as an Alternative to Matlab

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Thu Aug 13 23:52:44 EDT 2009

That is the default. But, we want to user to be able to control the
representation for numerical analysis reasons, too. So, we're allowing both.

On Thu, Aug 13, 2009 at 9:50 PM, Eli Barzilay <eli at barzilay.org> wrote:

> On Aug 13, Doug Williams wrote:
> > >* However, if you're doing a lot of work *inside* Scheme, then
> > >  things can become very inefficient.  For example, say that you
> > >  want to loop over a floating point array and multiply all of the
> > >  values by a given factor.  What will happen in this case is: each
> > >  time you read a value, you allocate a Scheme object for the fp
> > >  number, multiplying that allocates a new one, then saving it
> > >  copies the result back to the array, leaving the two allocated
> > >  values to be GCed.  (There are some JIT-level optimizations for
> > >  fp numbers, I don't know if it can save one of these allocations
> > >  in this case.)
> >
> > My plan would be to do the work inside of Scheme - at least for
> > now. It would be interesting to see if there are some JIT
> > optimizations planned for the future that could help.
>
> In this case going with a Scheme vector will be faster.
>
> --
>          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                    http://barzilay.org/                   Maze is Life!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090813/f946ad0d/attachment.html>

Posted on the users mailing list.