[webkit-dev] Is there a plan for supporting multi-process and WebCL in webkit

Oliver Hunt oliver at apple.com
Wed Apr 10 12:58:31 PDT 2013

I'm not sure what you mean here: a parallel array is simply an array of numbers; there is nothing "magic" about it.

If we _really_ wanted to be blunt about it, we could simply say (in Array.map)

if (length >= giant && function.isEasyPeasy() && everything in the array is a number)
   return doHardcoreMap();

// carry on doing regular map

Understand that the parallel APIs have to do all of this as well, the only thing they lose is the "is everything a number" check


On Apr 10, 2013, at 12:50 PM, Dirk Pranke <dpranke at chromium.org> wrote:

> Right, I get how ParallelArrays would work. I was asking Filip how you might infer that an array could be a ParallelArray.
> -- Dirk
> On Wed, Apr 10, 2013 at 12:45 PM, Oliver Hunt <oliver at apple.com> wrote:
> The parallel arrays apis aren't a magic "make my code parallel" wand.
> They don't make general code parallel, they simply provide a bunch of functions like map, etc where if you restrict your list of language features to a specific subset, they'll vectorise it.
> For instance
> ParallelArray([1,2,3]).map(function(a,v) { return v * 2; })
> would be vectorised
> ParallelArray([1,2,3]).map(function(a,v) { return v.x * 2; })
> wouldn't be.
> This isn't "solve autovectorisation", this is "we've been given a specific operation to perform on each element of an array, parallelise it if possible", and what's possible is arbitrarily limited, and require a distinct type that isn't an array.
> --Oliver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130410/beedcce0/attachment.html>

More information about the webkit-dev mailing list