[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 15 11:02:42 PST 2018
vsk added a comment.
In D55658#1332249 <https://reviews.llvm.org/D55658#1332249>, @riccibruno wrote:
> In D55658#1332240 <https://reviews.llvm.org/D55658#1332240>, @vsk wrote:
>
> > Thanks for working on this :). It’d be interesting to see some pre/post patch compile time numbers on CTMark.
> >
> > Naive/strawman alternative here, but: what’s the impact on peak RSS and compile time of just storing an ASTContext pointer in Decl/DeclContext? If it’s not out of the question to grow Decl etc. and it gives a nice speed up, that might be a simpler approach.
>
>
> I will try to get some numbers from CTMark.
>
> I don't think that storing a ref/pointer to the `ASTContext` in each `DeclContext` (no point in storing it in `Decl`) is a great idea.
> I experimented with this and the speedup from avoiding the lookup of the `ASTContext` is almost completely offset by
> the slowdown from the increased memory usage.
Good to know, thanks for trying it out!
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55658/new/
https://reviews.llvm.org/D55658
More information about the cfe-commits
mailing list