1.5% speedup on page load

Cool cool checkin:
inline nsIContent document and parent getters

I got about a 1.5% speedup on page load by inlining GetDocument and GetParent on nsIContent. To deal with GenericDOMDataNode overloading the low two bits of the parent pointer, I just always mask those in GetParent(). I don't believe that's going to slow anything down since a single AND instruction is still cheaper than a virtual function call. I also inline an overloaded GetParent() in the subclasses that don't use those bits for anything, so that they don't pay a penalty.

Mozilla just gets faster and faster! I loove open source. Internet Explorer has not really evolved for too many years.


November 07, 2003 01:20 PM | Posted in Mozilla

Ads:

Back Next

0 Comments

Post a comment




Remember Me?




Please enter the security code you see here

.
You're here: Home - 1.5% speedup on page load
Get the Mozilla Firefox browser