Closed Bug 880920 Opened 6 years ago Closed 6 years ago

Lexicographic integer sort can be slightly simplified

Categories

(Core :: JavaScript Engine, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
I happened to run across this code in other reading and noticed it's identical to computing absolute-value -- no reason not to use Abs for this, now that it exists and doesn't have abs(INT32_MIN)'s issues.
Attachment #760031 - Flags: review?(luke)
Comment on attachment 760031 [details] [diff] [review]
Patch

Heh.  In theory, this could be an ounce slower (two >=0 branches vs. one), but probably doesn't matter.
Attachment #760031 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/3f3ab64fea60
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.