Closed Bug 1081317 Opened 10 years ago Closed 10 years ago

Don't create temporary boxing objects when converting primitive to a string.

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 35

People

(Reporter: ckitching, Assigned: ckitching)

Details

Attachments

(1 file)

Another microoptimisation. The original code constructs a new Long object boxing the input and calls toString on it. Instead, we can use the static toString method which just gives us a string with no intermediate object (that immediately becomes garbage).
Attachment #8503414 - Flags: review?(rnewman) → review+
https://hg.mozilla.org/mozilla-central/rev/8eb295a430d4
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Upstreamed.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.