Closed
Bug 906773
Opened 12 years ago
Closed 12 years ago
PJS: New "ComputeSliceBounds" function in ParallelArray.js
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: dbonetta, Assigned: dbonetta)
References
Details
Attachments
(1 file, 2 obsolete files)
2.37 KB,
patch
|
Details | Diff | Splinter Review |
This patch includes an improved version of the "ComputeSliceBounds" function used to split the ParallelArray. The new version assigns tasks to parallel workers more efficiently.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Blocks: PJS
Summary: New "ComputeSliceBounds" function in ParallelArray.js → PJS: New "ComputeSliceBounds" function in ParallelArray.js
Comment 2•12 years ago
|
||
Comment on attachment 792309 [details] [diff] [review]
bug-906773-fix.patch
Review of attachment 792309 [details] [diff] [review]:
-----------------------------------------------------------------
Marking Shu for review.
::: js/src/builtin/ParallelArray.js
@@ +56,5 @@
> function ComputeSliceBounds(numItems, sliceIndex, numSlices) {
> var sliceWidth = (numItems / numSlices) | 0;
> + var extraChunks = (numItems % numSlices) | 0;
> +
> + var startIndex = sliceWidth * sliceIndex + Math.min(extraChunks, sliceIndex);
Math.min should be std_Math_min.
@@ +83,5 @@
> + ARRAY_PUSH(info, SLICE_INFO(counter, counter + sliceWidth + 1));
> + counter += sliceWidth + 1;
> + }
> + for (; i < numSlices; i++) {
> + ARRAY_PUSH(info, SLICE_INFO(counter, counter + sliceWidth));
nit: whitespace at the end.
Attachment #792309 -
Flags: review?(shu)
Comment 3•12 years ago
|
||
Comment on attachment 792309 [details] [diff] [review]
bug-906773-fix.patch
Review of attachment 792309 [details] [diff] [review]:
-----------------------------------------------------------------
Marking as r+, presuming that sankha93 comments are addressed
Attachment #792309 -
Flags: review?(shu) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #792309 -
Attachment is obsolete: true
Comment 5•12 years ago
|
||
Oh, this wasn't pushed. I updated the commit message and marking checkin-needed.
Attachment #792473 -
Attachment is obsolete: true
Updated•12 years ago
|
Keywords: checkin-needed
Comment 6•12 years ago
|
||
Keywords: checkin-needed
Updated•12 years ago
|
Assignee: general → dbonetta
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•