Closed Bug 1561573 Opened 5 months ago Closed 2 months ago

Avoid linearization and inflation to UTF-16 of the string input to TextEncoder

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

To optimize string passing from JS to Wasm, avoid having the WebIDL layer linearize the input string and inflate it to UTF-16.

Type: defect → enhancement
Blocks: 1561843
Priority: -- → P3
Attachment #9089319 - Attachment is obsolete: true

Performance-wise this seems like a clear win. The performance depends on the input, of course. While I can construct input that regresses performance by low single-digit percentages, when ASCII rope segments are involved, the improvements go into good double-digit percentages and the perf over doubles in the best case.

Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c7d88625df86
Avoid linearization and inflation to UTF-16 of the string input to TextEncoder. r=jandem,bzbarsky
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1582312
You need to log in before you can comment on or make changes to this bug.