Add blink::ContainerNode::hasChildren()
Add blink::ContainerNode::hasChildren() to shadow blink::Node::hasChildren() to avoid the virtual dispatch that leads to at least 7-12% regressions in some blink query-selector benchmarks, when we know the type statically to be ContainerNode. This is especially bad on Android, where the blink::Node::hasChildren() function is big enough not be inlined, so we miss out on extra optimizations. See the linked bug for a more in-depth analysis of the regression. Bug: 1149340 Change-Id: Ida1d8b609b23ada25ae5ed67826439c74633721c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633194Reviewed-by:Kentaro Hara <haraken@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org> Cr-Commit-Position: refs/heads/master@{#845376}
Showing
Please register or sign in to comment