[webkit-changes] [WebKit/WebKit] 1f4519: Compare pointers first in CSSCustomPropertyValue::...

Simon Fraser noreply at github.com
Fri Sep 1 22:29:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1f4519fc48941d23c7d19b67abe97afbd9aa638e
      https://github.com/WebKit/WebKit/commit/1f4519fc48941d23c7d19b67abe97afbd9aa638e
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M Source/WebCore/css/CSSCustomPropertyValue.cpp

  Log Message:
  -----------
  Compare pointers first in CSSCustomPropertyValue::equals()
https://bugs.webkit.org/show_bug.cgi?id=261057
rdar://114854431

Reviewed by Chris Dumez.

When CSSCustomPropertyValue holds a variant type that is a pointer, do pointer comparison first
before comparing values. This avoids calls to the expensive `CSSVariableData::operator==`, which
gives a measurable perf boost on some Speedometer 3 subtests with lots of custom properties.

* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::equals const):

Canonical link: https://commits.webkit.org/267578@main




More information about the webkit-changes mailing list