[webkit-changes] [WebKit/WebKit] 3c19d4: Optimize createJSHTMLWrapper()

Chris Dumez noreply at github.com
Tue Mar 28 08:14:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3c19d495573e7ad837bd534108d28ea4e7a1eef1
      https://github.com/WebKit/WebKit/commit/3c19d495573e7ad837bd534108d28ea4e7a1eef1
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-03-28 (Tue, 28 Mar 2023)

  Changed paths:
    M Source/WebCore/dom/make_names.pl

  Log Message:
  -----------
  Optimize createJSHTMLWrapper()
https://bugs.webkit.org/show_bug.cgi?id=254564

Reviewed by Yusuke Suzuki.

Optimize createJSHTMLWrapper() by using a switch statement and leveraging the
fairly recently added ElementName enumeration.

The previous code was relying on a HashMap which has some extra cost associated
with hashing and dealing with hash collisions. It also relied on function
pointers which made inlining harder.

* Source/WebCore/dom/make_names.pl:
(printFactoryCppFile):
(printWrapperFactoryCppFile):

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




More information about the webkit-changes mailing list