develooper Front page | perl.perl5.porters | Postings from January 2001

Re: naive inquiry about vectorized Perl

Thread Previous
From:
Jarkko Hietaniemi
Date:
January 30, 2001 07:37
Subject:
Re: naive inquiry about vectorized Perl
Message ID:
20010130093554.E2000@chaos.wustl.edu
On Tue, Jan 30, 2001 at 02:20:27AM -0800, Rich Morin wrote:
> I expect to be running Mac OS X one of these days, but I have been
> thinking that my G3 is probably about as fast as it needs to be to
> do everything I really need.  Then I started thinking; might Perl
> be able to take advantage of the Velocity Engine (read, vector
> processor) that the G4 has?  Not just by means of a library, mind,
> but in things that get done for vanilla Perl code.

I doubt it.  I once tried to a vectorized perl in a Cray, the result
was no measurable difference at all.  Which is quite obvious once you
think about it: in how many places Perl does things like add a same
number to an array of number, and I mean numbers, not SVs.  The answer
is none.  Vector processing is cool for algorithms like FFTs, and for
applications like signal processing and graphics, but for string
munging it is usually rather pointless.  I guess that with a twisted
enough mindset one could do things like parallelized substring
searching or with a truly sick mind parallelized regexps, but then we
easily are talking about writing the code in assembler, since your
vanilla C cannot even describe such mind-bending things.

> Can someone fill me in on any vector-processing capability that is
> currently in Perl (or planned to be in it RSN)?  Does anyone know

None, none.  But take a look at PDL.

> whether the Velocity Engine might be able to take advantage of any
> of this?

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About