There doesn't seem to be a way to compare a uint16_t string to a latin1 string
Categories
(Core :: XPCOM, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | affected |
People
(Reporter: bzbarsky, Unassigned)
References
Details
In bug 1530208 I am trying to compare two textfragments' text. Textfragment stores its data as either a uint16_t* or a char*, and in the latter case it's latin1-encoded (so we use it for cases when all the uint16_t's in our string were <255).
There doesn't seem to be a way to compare those two cases to each other without rolling my own compare. The actual code would pretty much look like EqualsASCII, but we'd need to be a little careful about signed vs unsigned bits and whatnot.
We do have a nice preexisting, and even vectorized, LossyConvertUTF16toLatin1...
It would make sense to put a vectorized comparison in encoding_rs::mem. Considering the infra change from simd to packed_simd, as a practical matter, landing such a vectorization in m-c needs to wait for bug 1521249.
Assignee | ||
Updated•4 years ago
|
Updated•2 years ago
|
Description
•