This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Reimplement ADL


On 05/25/2017 03:07 PM, Jason Merrill wrote:

The recursion is a rare event, so we optimize the non-recursive case.

Sounds like it would make sense to use a hash_set rather than flags on
the decls.

I don't think that would be a win. Although both are O(1), the constant factor is greater for the hash_set. As I said, it is rare -- I think there was only once instance in building libstdc++ or in its testsuite, I can't recall which.

The cost of fixing it up is pretty cheap anyway -- iterate over the vector of seen scopes.

nathan

--
Nathan Sidwell


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]