Consider storing the string length in atoms

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
12 years ago
5 years ago

People

(Reporter: bz, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

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...

Comment 2

10 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.