On Thu, Mar 3, 2016 at 10:22 AM, Manuel López-Ibáñez <lopeziba...@gmail.com> wrote: > On 03/03/16 14:49, Patrick Palka wrote: >> >> I think the slowness of this function is mostly due to the pointer >> chasing performed in the function store_bindings, where we iterate >> over all the names in each non-global scope to figure out whether to >> preserve them. It would probably improve performance if >> cp_binding_level::names were a vector of trees instead of a linked >> list of trees. > > > It would be an overall improvement if it was neither a TREE_LIST, nor a > TREE_VECTOR: https://gcc.gnu.org/wiki/Speedup_areas#Trees > > Those kinds of cleanups are always welcome even if they do not improve > performance noticeably at first glance. The speed-up will show up once > TREE_LIST is removed completely.
Ah yeah, I meant if cp_binding_level::names were a vec<tree, va_gc> since it would have to be resizable. > > Cheers, > > Manuel. > >