RESOLVED FIXED 6167
RenderStyle default constructor should initialize its members for speed
https://bugs.webkit.org/show_bug.cgi?id=6167
Summary RenderStyle default constructor should initialize its members for speed
Darin Adler
Reported 2005-12-20 09:24:32 PST
The default constructor for RenderStyle doesn't initialize its members. Instead it lets them all get default initialized and then uses assignment to set their initial values. This results in extra code because of the DataRef operator= implementation. Also, DataRef's operator= should have the "==" check removed since that extra branch makes things a little slower.
Attachments
both performance improvements described in the bug text (4.76 KB, patch)
2005-12-21 22:47 PST, Darin Adler
no flags
both performance improvements described in the bug text (4.89 KB, patch)
2005-12-21 22:51 PST, Darin Adler
eric: review+
Darin Adler
Comment 1 2005-12-21 22:47:47 PST
Created attachment 5215 [details] both performance improvements described in the bug text
Darin Adler
Comment 2 2005-12-21 22:51:25 PST
Created attachment 5216 [details] both performance improvements described in the bug text
Eric Seidel (no email)
Comment 3 2005-12-22 01:32:00 PST
Comment on attachment 5215 [details] both performance improvements described in the bug text Another great looking patch. I assume this is a performance win? r=me.
Eric Seidel (no email)
Comment 4 2005-12-22 01:38:39 PST
Comment on attachment 5215 [details] both performance improvements described in the bug text oops, wrong one.
Eric Seidel (no email)
Comment 5 2005-12-22 01:39:01 PST
Comment on attachment 5216 [details] both performance improvements described in the bug text r=me. It looks like void RenderStyle::cleanup() could just be killed entirely now.
Darin Adler
Comment 6 2005-12-22 08:32:22 PST
I left the cleanup function in there because Maciej has the commented-out counts in it. I would have removed it entirely if that wasn't there.
Note You need to log in before you can comment on or make changes to this bug.