Closed
Bug 1840797
Opened 1 year ago
Closed 1 year ago
Optimise String.prototype.{is,to}WellFormed
Categories
(Core :: JavaScript: Standard Library, enhancement)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
116 Branch
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Perform the following optimisations:
- Don't linearise Latin-1 strings.
- Use
InlineCharBuffer
to avoid heap allocations for small strings. - Return the result of
Utf16ValidUpTo
fromIsStringWellFormedUnicode
so we can skip the initial characters when callingEnsureUtf16ValiditySpan
. - Don't try to deflate non-wellformed strings, because they will always contain the replacement character and therefore can't be stored as Latin-1 strings.
Assignee | ||
Comment 1•1 year ago
|
||
Perform the following optimisations:
- Don't linearise Latin-1 strings.
- Use
InlineCharBuffer
to avoid heap allocations for small strings. - Return the result of
Utf16ValidUpTo
fromIsStringWellFormedUnicode
so we
can skip the initial characters when callingEnsureUtf16ValiditySpan
. - Don't try to deflate non-wellformed strings, because they will always contain
the replacement character and therefore can't be stored as Latin-1 strings.
Also add some additional tests to cover string types which aren't tested in
the test262 tests.
Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/777551a9013e
Optimise String.prototype.{is,to}WellFormed. r=allstarschh
Comment 3•1 year ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox116:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•