[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dylan scientific/multimedia



> From: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
> There are a whole lot of applications that Apple works with that could
> very much benefit from good floating-point performance.  Consider

> ... that for modern RISC processors, floating-point performance is often
> better than fix-point performance.  One possibility is to call out to

I agree with these comments!  Multimedia in particular is an
application area of interest to Apple developers, and which is
similar to scientific programming-- the 'back end' operations
on data types such as sound and video resemble scientific code
in being highly vectorizable.

I was recently surprised to find that on both Sparc2 and SGI/mips r3000 
machines, a floating point algorithm was (slightly) faster than 
the same algorithm converted to fixed point.

I very much hope that some attention is paid to providing for efficient
numerics in Dylan.  This might take various forms--
Are there currently any Lisp implementations which do floating point
very efficiently?  I don't know of any, so I'm not expecting this
from Dylan either, but it would be nice.

A more primitive approach to efficient vectorizable code is 
'APL in lisp', i.e., code a set of APL-like vector primitives
in C and then either overload particular Lisp/dylan arithmetic
operators, or provide a mini-compiler from standard serial expressions
onto the vector operators.  The latter approach is used in some
extensions to elk scheme which will be part of Elk2.0 in a month or two.

Most minimally, efficient numerics would be possible if there
were an efficient C foreign function interface.  Personally I don't
mind writing some inner loops in C.

I wish:
- That Dylan would have a recommended standard foreign function interface,
  even if it is minimal or high level.
  Developing the FF glue for a large library can be a lot of work;
  one would like this work to be portable.  

- That Dylan provide for homogeneous arrays of short floats and ints.
  If not, vectorized coding can still be done by allocating foreign storage
  on the heap and manipulating this with the C-coded vector ops.
  Someone borrowed my Dylan manual, so i don't know if this is possible.