Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

followup performance optimization to 1308 #1350

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

cdisselkoen
Copy link
Contributor

Description of changes

Inspired by this thread in #1308. Avoids repeatedly calling ast::Name::parse_unqualified_name() during EST parsing. On my machine (a different machine than the one I reported numbers on in #1308), the performance of our deeply_nested_est benchmark goes from 71.6 µs before this PR, to 63.3 µs after this PR, an 11% improvement.

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A change "invisible" to users (e.g., documentation, changes to "internal" crates like cedar-policy-core, cedar-validator, etc.)

I confirm that this PR (choose one, and delete the other options):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar language specification.

Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
@cdisselkoen
Copy link
Contributor Author

Updated performance numbers after my latest push: now a 14% improvement on the deeply_nested_est benchmark from before this PR to after this PR

@cdisselkoen cdisselkoen merged commit dd6b9f0 into main Dec 3, 2024
19 checks passed
@cdisselkoen cdisselkoen deleted the cdisselkoen/followup-1308 branch December 3, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants