Closed Bug 1290676 Opened 9 years ago Closed 9 years ago

Call InsertionSort when |denseLen < 24| in MergeSort?

Categories

(Core :: JavaScript: Standard Library, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- affected
firefox51 --- fixed

People

(Reporter: anba, Assigned: jj, Mentored)

References

Details

Attachments

(1 file)

http://hg.mozilla.org/mozilla-central/file/e5859dfe0bcb/js/src/builtin/Sorting.js#l251 --- // Insertion sort for small arrays, where "small" is defined by performance // testing. if (len < 24) { .... --- Shouldn't this line check for |denseLen| instead of |len|? And the |denseList| allocation in [1] should probably be moved after [2]. [1] http://hg.mozilla.org/mozilla-central/file/e5859dfe0bcb/js/src/builtin/Sorting.js#l232 [2] http://hg.mozilla.org/mozilla-central/file/e5859dfe0bcb/js/src/builtin/Sorting.js#l239
Mentor: winter2718
Assignee: nobody → jsnajdr
Attached patch a1.diffSplinter Review
Attachment #8778933 - Flags: review?(winter2718)
Assignee: jsnajdr → jinank94
Comment on attachment 8778933 [details] [diff] [review] a1.diff Nice, thanks!
Attachment #8778933 - Flags: review?(winter2718) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/af3c0ced9dc4 Call InsertionSort when |denseLen < 24| in MergeSort. r=mrrrgn
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: