hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.39k stars 232 forks source link

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

Closed JohelEGP closed 8 months ago

JohelEGP commented 8 months ago

This work arounds https://github.com/llvm/llvm-project/issues/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 commented 8 months ago

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