Bug 252904

Summary: Performance regression on selector match benchmark (add UNLIKELY to help branch prediction)
Product: WebKit Reporter: Matthieu Dubet <m_dubet>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Matthieu Dubet 2023-02-24 07:36:40 PST
The introduction of css-nesting (original VS resolved selector list) has introduced a small performance regression on selector matching benchmark.

https://perf.webkit.org/v3/#/charts?since=1663309346443&paneList=((22-1649-null-null-(5-2.5-500)))

Adding a UNLIKELY to help the compiler mitigate the performance decrease in the most frequent case (no nesting) could help.
Comment 1 Radar WebKit Bug Importer 2023-02-24 07:37:10 PST
<rdar://problem/105883716>
Comment 2 Matthieu Dubet 2023-02-24 14:03:16 PST
Pull request: https://github.com/WebKit/WebKit/pull/10665
Comment 3 Matthieu Dubet 2023-03-17 08:43:07 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11656
Comment 4 EWS 2023-03-17 14:59:52 PDT
Committed 261809@main (29a558295527): <https://commits.webkit.org/261809@main>

Reviewed commits have been landed. Closing PR #11656 and removing active labels.