https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83309

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
yeah, I'm not surprised by these numbers.  IIUC the linear search happens when
we get a qualified lookup during parsing.  Unqualified lookup will find the
IDENTIFIER_VALUE binding.  But ICBW.

Anyway, when I tried to fix this piece, I kept running into a wall, due to the
way we try and make all bindings behave somewhat as-if a regular local-scope
binding.  Which is why I ended up punting.  See my gcc cauldron name-lookup
talk.

One bit we could change is keep the MEMBER_VEC sorted during construction. 
That holds member functions during that time.  We'd still need to do the linear
field lookup though, to find non-function members.  Patch for this on the
name-lookup branch.

Reply via email to