[cfe-dev] Feature proposal: adding optional custom info to clang AST nodes.

Mike Stump mrs at apple.com
Sat Aug 15 18:32:00 PDT 2009


On Aug 15, 2009, at 10:18 AM, Abramo Bagnara wrote:
> The library is less general but using a map it would be much less  
> efficient.

Can you categorize this for us?  Do up your full app using each  
approach, then benchmark it on some real data.  Let us know the %  
slowdown.  If large, we might be able to come up with a better design  
that lets you get more performance.  For now, we just tend to doubt  
the benefit is worth the cost.

There are other ways to get the pointers, for example, you can visit  
things of interest, numbering each as you go sequentially.  Then, you  
can use this number as the index into an array to directly get at the  
data on the side, no searching and as dense as you want.  The cost, an  
extra parameter on visitors and one index for each node reference you  
might want to randomly walk to.



More information about the cfe-dev mailing list