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