Re:A closer look at the performance of Google Chrome
by jv- on Monday February 25, 2013 @06:31PM
(#5282637)
Doesn't the compiler inline this kind of functions?
[ Parent
| on HN ]
Re:A closer look at the performance of Google Chrome
by timv on Monday February 25, 2013 @06:37PM
(#5282671)
The article's claim is that the inheritance model in WebKit is too complex for the compiler to be able to inline it.
the extensive use of dynamic class inheritance prevents the compiler from efficiently inlining short functions as necessary
Re:A closer look at the performance of Google Chrome
by bzbarsky on Tuesday February 26, 2013 @08:02AM
(#5285270)
You can't easily inline _virtual_ functions.
MSVC with PGO will do it, by inserting a guard on the vtable pointer and inlining the most common implementation. But you still take the possible cache miss of reading the vtable pointer, of course. And the other commonly used compilers (clang and gcc) don't do anything like this, even with PGO.