Simplify and inline minimumValueForLength(). Based on iOS PLT profiles, we spend up to 0.7% of CPU time during page loads in this function.
Created attachment 279803 [details] Patch
Comment on attachment 279803 [details] Patch Clearing flags on attachment: 279803 Committed r201401: <http://trac.webkit.org/changeset/201401>
All reviewed patches have been landed. Closing bug.
Comment on attachment 279803 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=279803&action=review I think also there is no real need for the sources LengthFunctions.h and LengthFunctions.cpp. All the functions in these files can be moved to Length.h and LengthSize.h. The names of the functions should be shorter and clearer. Instead of having inline LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue) We can have inline LayoutUnit Length::minimumValue(LayoutUnit maximumValue) const; > Source/WebCore/css/LengthFunctions.h:38 > +int minimumIntValueForLength(const Length&, LayoutUnit maximumValue); This function is called only twice in the windows code. Can't we make the casting inline? > Source/WebCore/css/LengthFunctions.h:39 > int intValueForLength(const Length&, LayoutUnit maximumValue); I am not sure why do we need intValueForLength() especially all what it does is just casting which can be inline. Also it is only used in 6 places; 4 of them in in one block of code.