Skip to content

refactor(parse): cache "expression list is a fold expression" #886

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

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

JohelEGP
Copy link
Contributor

This work arounds llvm/llvm-project#73336.
This is the delta when I compile cppfront with LLVM 18 at -O2:

real	3m10.558s
user	3m8.552s
sys	0m0.474s

real	0m46.694s
user	0m45.891s
sys	0m0.362s

@hsutter
Copy link
Owner

hsutter commented Dec 11, 2023

Ah, that makes sense for breaking the dependency -- cache it right before returning the successful parse, since everything is immutable after that. Thanks!

@hsutter hsutter merged commit 2f48916 into hsutter:main Dec 11, 2023
@JohelEGP JohelEGP deleted the cache_expr.prim_is_fold branch December 11, 2023 01:38
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.

2 participants