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: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level


On Thu, Mar 3, 2016 at 10:22 AM, Manuel LÃpez-IbÃÃez
<lopezibanez@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.
>
>


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