I was doing some performance work on JavaScript and found some speedups from tweaking UString and Identifier a little -- a bit more inlining and a bit less reference count bumping.
Created attachment 3390 [details] patch that does a bit more inlining and changes reference counting a bit
*** Bug 4418 has been marked as a duplicate of this bug. ***
I'm thinking that the part of this patch that tweaks reference counting isn't really so helpful, since it only saves a ref() in the case where the identifier is a new one -- I don't know how common that code path is.
Comment on attachment 3390 [details] patch that does a bit more inlining and changes reference counting a bit I'm not sure I understand this patch - it adds a bunch of calls to ref, but I guess the few it removes were called more often? I assume you performance tested this so r=me
The ref change removes a ref from a common code path, and adds it back in all cases but one. I think the performance improvement I measured was from the other change. I think I'll land the other part without the ref change.
I landed the null and UString() improvements and didn't bother with the questionable ref/deref improvement.