On Dec 7, 2012, at 9:47 AM, Jordan Rose <[email protected]> wrote:

> Yuck. Can we push this up to ASTContext or AnalysisManager?

It doesn't belong in ASTContext, unless it is a general optimization for all 
clients.

Pushing to AnalysisManager seems reasonable.

> 
> Also, it seems like a waste to double the size of every value in the map by 
> using Optional, even if you would otherwise need to do two lookups (first 
> find() and then insert()) in the slow case.

Two lookups would be noticeably slower.  I also suspect the memory overhead is 
inconsequential.  We are talking about a few kilobytes at most, on a very 
complicated file.  We can bit-mangle the pointer, if you like, to provide a 
sentinel value.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to