Closed Bug 307832 Opened 20 years ago Closed 14 years ago

Consider storing the string length in atoms

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Unassigned)

References

Details

With bug 307601 fixed (by attachment 172366 [details] [diff] [review]), the single most time consuming part of nsIAtom::Equals(AString) is the strlen on the atom's char* needed to create the dependent string. Would it perhaps make sense to store the string length in atoms so that it can just be passed in when we create the dependent string?
For that matter, would it make sense to use an nsStringBuffer* instead of a char* in atoms? That will make all atoms 8 bytes bigger, but maybe that's ok. I guess since it's a char* buffer, not PRUnichar*, there's not much win to the Unicode ToString from this, though...
mass reassigning to nobody.
Assignee: dougt → nobody
Jonas, didn't bug 534136 just fix all this?
Depends on: 534136
This was fixed a long time ago
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.