Closed
Bug 1466050
Opened 5 years ago
Closed 5 years ago
Avoid a strlen call in NumberToStringWithBase for int32 values
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file)
2.97 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•5 years ago
|
||
Int32ToCString() already returns the string length, so we can reuse that info instead of calling strlen() again in NewStringCopyZ(). This also matches the approach taken in js::NumberValueToStringBuffer(). Also removes an out of date comment in js::NumberValueToStringBuffer.
Attachment #8982448 -
Flags: review?(jdemooij)
Comment 2•5 years ago
|
||
Comment on attachment 8982448 [details] [diff] [review] bug1466050.patch Review of attachment 8982448 [details] [diff] [review]: ----------------------------------------------------------------- Great :)
Attachment #8982448 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•5 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=66e0deb6926fb5dfdbfdadd82312caf3c190c956
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/eacd6f23d1d6 Skip a call to strlen in Number.prototype.toString when length was already computed. r=jandem
Keywords: checkin-needed
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eacd6f23d1d6
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•