Introduced in Gecko 17.0
Non-standard
Gecko 22.0 note
This object is now disabled in the Beta, Release and ESR channels. Use the Aurora or Nightly channel to try out this feature. (bug 853067)
Summary
The goal of ParallelArray is to enable data-parallelism in web applications.
Syntax
new ParallelArray() new ParallelArray([element0, element1, ...]) new ParallelArray(arrayLength, elementalFunction)
ParallelArray
instances
Properties
- length
-
Reflects the number of elements in the
ParallelArray
.
Methods
- map
- Apply map callback to array elements.
- reduce
- scan
- scatter
- Scatter array elements.
- filter
- flatten
- partition
- get
- Get ParallelArray element.
Examples
Example: Using map in parallel
var p = new ParallelArray([0, 1, 2, 3, 4]); var m = p.map(function (v) { return v + 1; });