Closed
Bug 1067033
Opened 10 years ago
Closed 9 years ago
Parallel always about 2x slower than sequential execution?
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: sole, Unassigned)
References
Details
I might not be doing this right but it seems like in my mini test for parallel JS I always get that the sequential operation is about 2x faster than the parallel version: http://sole.github.io/not-pyjamas/ Specific JS Code: https://github.com/sole/not-pyjamas/blob/1013e6e1abe30be00adc4de3bb3681ea57586be1/js/main.js#L29-L43 An example execution results in: parallel map with fat arrow 539.9478449999999 parallel map with normal callback 519.5102109999999 sequential map 289.1026280000001 Increasing the number of array elements or the number of iterations results in the same relation between sequential and parallel. I tried to use a function that would bail out by not being side effect free and it effectively bailed out, so I'm assuming the other functions are OK and are "parallelised". Using Nightly 20140913 on Mac Mavericks.
Comment 1•10 years ago
|
||
At present there is substantial setup/shutdown overhead in the parallel engine that swamps the benefit of parallelizing over small kernel functions (a la (v) => v+1). That's probably the main effect you're seeing here. For more substantial kernels it is more common to see parallel execution be faster.
Comment 2•9 years ago
|
||
PJS has been removed from Firefox.
You need to log in
before you can comment on or make changes to this bug.
Description
•