[Webkit-unassigned] [Bug 64262] Small speed up, which switches some virtual functions to inline ones.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 29 08:16:08 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64262





--- Comment #22 from Benjamin Poulain <benjamin at webkit.org>  2011-07-29 08:16:08 PST ---
Created an attachment (id=102363)
 --> (https://bugs.webkit.org/attachment.cgi?id=102363&action=review)
Idea for comments

I have been thinking about this issue.

On one side, I understand how this can have a dramatic impact on performance. On the other side, I really do not like the patch because it is creating instance variable for something that should really be a class property.

Ideally, we would attach the booleans/enums to the vtable to the class but C++ does not provide anything to do that as far as I know. So a solution to have both speed and tight memory usage is to make a vtable-like structure ourself :-D
That should reduce the generated code size in this case, keep the same memory consumption as currently, and recuce the number of CPU cycles to access those properties.

The cost is:
-very C-like code, quite harder to read and edit than C++.
-less type checking at compile time, like instanciating a class with pure virtual functions

That is just an idea for comments. I attached a quick mockup of what CSSValue would look like.
I am willing to make such changes if we agree this kind of patch can land (and of course iff that change is indeed a significant speed improvement).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list