Extending standard library of arrays
Mark S. Miller
erights at google.com
Mon Jul 11 10:14:19 PDT 2011
On Mon, Jul 11, 2011 at 8:32 AM, David Herman <dherman at mozilla.com> wrote:
> > My point is that the map spec is a deterministic algorithm because
> side-effects would be noticeable otherwise. However, this prevent
> implementations where function calls would be done in parallel for instance
> (for better performances). In some cases (like the one I showed), the exact
> order in which the function calls are performed does not matter, but I have
> no way to tell the JS engine "I don't need the execution order guarantee",
> allowing it to do the calls in parallel. The addition of the functions I
> suggested would be the way to say it.
> We can't do this in general for JS, especially for the mutable Array data
> structure. It's not in general safe to run JS code in parallel. However,
> this would be much more appropriate for immutable and homogeneous datatypes.
> At least for callback code that could be proved to be safe to run
> non-deterministically, operations like map could be run in parallel. We have
> been working with some partners on this. Watch this space.
See also <
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss