Closed
Bug 1466050
Opened 7 years ago
Closed 7 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•7 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•7 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•7 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•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•