Last Comment Bug 307832 - Consider storing the string length in atoms
: Consider storing the string length in atoms
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on: 307601 534136
  Show dependency treegraph
Reported: 2005-09-09 21:41 PDT by Boris Zbarsky [:bz]
Modified: 2011-12-12 21:58 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description Boris Zbarsky [:bz] 2005-09-09 21:41:49 PDT
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?
Comment 1 Boris Zbarsky [:bz] 2005-12-28 23:01:46 PST
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 Doug Turner (:dougt) 2007-10-08 16:13:41 PDT
mass reassigning to nobody.
Comment 3 Boris Zbarsky [:bz] 2010-05-14 20:59:59 PDT
Jonas, didn't bug 534136 just fix all this?
Comment 4 Jonas Sicking (:sicking) 2011-12-12 21:58:42 PST
This was fixed a long time ago

Note You need to log in before you can comment on or make changes to this bug.