Add an nsTArray::ContainsSorted() function that works like Contains() but assumes the array is sorted

RESOLVED FIXED in Firefox 58

Status

()

Core
XPCOM
RESOLVED FIXED
a month ago
a month ago

People

(Reporter: bz, Assigned: bz)

Tracking

(Blocks: 1 bug)

53 Branch
mozilla58
Points:
---

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment)

Because binary search is better than linear search.
Duplicate of this bug: 1409182
Created attachment 8919053 [details] [diff] [review]
Add an nsTArray::ContainsSorted method
Attachment #8919053 - Flags: review?(nfroyd)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8919053 [details] [diff] [review]
Add an nsTArray::ContainsSorted method

Review of attachment 8919053 [details] [diff] [review]:
-----------------------------------------------------------------

That we can replace code with this new method is a good indication that we should have it!
Attachment #8919053 - Flags: review?(nfroyd) → review+

Comment 4

a month ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3fcdeba5f88
Add an nsTArray::ContainsSorted method.  r=froydnj
https://hg.mozilla.org/mozilla-central/rev/f3fcdeba5f88
Status: ASSIGNED → RESOLVED
Last Resolved: a month ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.