From: njivy
Subject: OS X Lisps support AltiVec (Velocity Engine)?
Date: 
Message-ID: <1110298978.474228.180300@g14g2000cwa.googlegroups.com>
I am aware that with OpenMCL it is "now possible to use AltiVec [1]
instructions in PPC LAP  (assembler) functions." [2]  But what about
LispWorks, Allegro CL, MCL, and other Lisps for OS X?  Do their
compilers automatically transform code into vector operations or
support assembler instructions?

Nic Ivy

-----
[1]
http://www-128.ibm.com/developerworks/library/pa-unrollav1/?ca=dgr-lnxw01AltiVecP1
[2] http://openmcl.clozure.com/Doc/ch14s04.html

From: Rainer Joswig
Subject: Re: OS X Lisps support AltiVec (Velocity Engine)?
Date: 
Message-ID: <c366f098.0503090637.67e3f38a@posting.google.com>
"njivy" <······@gmail.com> wrote in message news:<························@g14g2000cwa.googlegroups.com>...
> I am aware that with OpenMCL it is "now possible to use AltiVec [1]
> instructions in PPC LAP  (assembler) functions." [2]  But what about
> LispWorks, Allegro CL, MCL, and other Lisps for OS X?  Do their
> compilers automatically transform code into vector operations or
> support assembler instructions?
> 
> Nic Ivy
> 
> -----
> [1]
> http://www-128.ibm.com/developerworks/library/pa-unrollav1/?ca=dgr-lnxw01AltiVecP1
> [2] http://openmcl.clozure.com/Doc/ch14s04.html

AFAIK, no Common Lisp implementation has automagical support
for AltiVec. I would expect that some very large speed
improvements could be achieved that way.

Customers of commercially supported Lisp systems should contact
there support, if they expect a certain operation to be much faster
using AltiVec.

Just to collect some ideas, what operations could benefit from
specialized AltiVec-based implementations:

- Garbage Collection
- Moving large areas of memory around
- Several array/vector/string functions (subseq, ...)
- Initializing arrays/vectors/strings...
- Some operations on large bitarrays
- Some Operations on Bignums
- Some Loops
From: Raffael Cavallaro
Subject: Re: OS X Lisps support AltiVec (Velocity Engine)?
Date: 
Message-ID: <raffaelcavallaro-E415ED.08261709032005@comcast.dca.giganews.com>
In article <························@g14g2000cwa.googlegroups.com>,
 "njivy" <······@gmail.com> wrote:

> Do their
> compilers automatically transform code into vector operations or
> support assembler instructions?

Just to put this question in context, Apple's own version of GCC will 
only support auto-vectorization in the next release (that is, it does 
not do so now). See:
<http://www.apple.com/macosx/tiger/xcode.html>

Given that the platform vendor does not yet support auto-vectorization 
in its compiler, it's easy to see how lisp implementations do not yet do 
so.

You could, as you mention, use OpenMCL and PPC LAP. Or you could use the 
ffi/fli of the various lisps to call libraries that use AltiVec. Or, you 
could wait for Tiger/gcc 4.0, and build your own auto-vectorized 
libraries for use with lisp. Tiger/gcc 4.0 are scheduled to ship by mid 
year.
From: njivy
Subject: Re: OS X Lisps support AltiVec (Velocity Engine)?
Date: 
Message-ID: <1110382971.247303.297080@z14g2000cwz.googlegroups.com>
I was unaware of GCC's intent to support auto-vectorization.  Given
this, I expect GCL will be among the first Lisps to automatically take
advantage of the Velocity Engine since GCL compiles to native C using
GCC.
From: Camm Maguire
Subject: Re: OS X Lisps support AltiVec (Velocity Engine)?
Date: 
Message-ID: <543bv3yctf.fsf@intech19.enhanced.com>
Greetings!

"njivy" <······@gmail.com> writes:

> I was unaware of GCC's intent to support auto-vectorization.  Given
> this, I expect GCL will be among the first Lisps to automatically take
> advantage of the Velocity Engine since GCL compiles to native C using
> GCC.
> 

Indeed.  In GCL, one can either append arbitrary gcc flags via
compiler::*cc*, or even write gcc __asm__ macros in a c function
defined from lisp via defentry and clines. (disassemble ...) will then
confirm that you are getting the assembler you want via its objdump
output. 

Take care,


-- 
Camm Maguire			     			····@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah