Adding loop primitives/optimizations (was Making Set/Dictionaryetc. loops more robust)

Joshua Scholar jscholar at access4less.net
Wed Dec 1 21:58:34 UTC 2004


----- Original Message ----- 
From: "John M McIntosh" <johnmci at smalltalkconsulting.com>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>; "Joshua Scholar"
<jscholar at access4less.net>
Sent: Wednesday, December 01, 2004 1:47 PM
Subject: Re: Adding loop primitives/optimizations (was Making
Set/Dictionaryetc. loops more robust)


>
> On Dec 1, 2004, at 1:22 PM, Joshua Scholar wrote:
>
> > Well, I'm used to a sort of programming where the speed of loops is
> > paramount.  In DSP programming, sound and graphics processing, an extra
> > instruction or two in a loop can mean a massive speed difference to a
> > program.
>
> When you are talking this type of stuff, then really you are talking
> about doing a plugin.
> A few years back I and others looked  at Altivec stuff for Squeak. What
> I found was that well we
> do have a set of primtives to do vector math already. If the data is in
> Arrays we can make the
> prim call and say add two vectors together. The problem was that adding
> a million elements takes
> just a few milliseconds, but the overhead to setup the prim call and
> get at the data  took many ms.
> So changing the cost from 2 milliseconds to less than 1 millisecond
> didn't make any difference to
> the bottom line since it took 10 ms to get us to where we could do the
> math.
>

But now that we have FloatArray, IntegerArray, WordArray and ByteArray
getting data into a useable state is free right?  It will already be
useable, right?

I'll respond to the rest later.  Gotta go to lunch.

Bye,
Joshua Scholar




More information about the Squeak-dev mailing list