Remove flat (null-terminated) strings
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: Waldo, Assigned: jandem)
References
Details
(Keywords: triage-deferred)
Attachments
(1 file)
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Stealing.. I have this working in the JS shell; will start posting patches tomorrow.
Assignee | ||
Comment 7•5 years ago
|
||
It's mostly green at this point: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=8df6e3dffa46d1533265ff236feb7c3f1b396dc9
Still some minor known issues to fix the coming days and I need to do more auditing. We don't want to land this before the merge next week anyway. A ~10 KB memory reduction for "Base Content JS opt" and diffstat of +386/-660 (no more "undepended" strings for example).
Comment 8•5 years ago
|
||
Oh, wow. I was intending to get to this eventually (and had some starting patches for it), but postponed it and in fact intended to eliminate undepended strings in a different way first. This is great!
Assignee | ||
Comment 9•5 years ago
|
||
JS strings can contain null bytes so relying on null-termination generally isn't
the best idea. The (relatively few) places that did rely on null termination
have been fixed separately to copy their characters to a new buffer.
This saves memory and avoids malloc/free for strings that now fit inline
(because this bumps the length limits for thin-inline and fat-inline strings).
It also simplifies dependent strings and external strings because we can remove
both JSUndependedString and JSExternalString::ensureFlat.
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
Comment 12•5 years ago
|
||
== Change summary for alert #23549 (as of Thu, 24 Oct 2019 10:37:32 GMT) ==
Improvements:
0.32% Base Content JS windows7-32 opt 3,124,744.00 -> 3,114,776.00
0.32% Base Content JS windows7-32-shippable opt 3,124,744.00 -> 3,114,776.00
0.32% Base Content JS windows7-32-shippable opt 3,124,738.67 -> 3,114,776.00
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=23549
Description
•