-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #122207 - Urgau:cfg-check-cfg-cache, r=<try>
Add cache-based fast path for cfgs and check-cfgs This PR add a fast path for testing if a cfg is enabled and is expected. This cache reduce the number of lookup from 2/3 to just 1 (in the good path). Currently: - when there are no expecteds cfgs, we do 2 lookup (one for finding if the cfg is enabled and the second for trying to get the expected values) - when there are some expecteds cfgs, we do 3 lookup in the good case (same as above + one to see if the value is in the expected values) and 2 in the "bad" case With this PR we will only do 1 lookup if the cfg is expected (aka the good case) no matter if the cfg is actually enabled or not. See the PR changes/commits for more details. The perf runs done below shows that there is no to a slightly improvement, which is expected as we do less work, but we also don't have any benchmark with many cfgs to be assertive.
- Loading branch information
Showing
3 changed files
with
78 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters