Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-04-21 Thread Jason Merrill
OK. Jason

Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-04-17 Thread Patrick Palka
On Thu, Mar 3, 2016 at 9:16 AM, Patrick Palka wrote: > push_to_top_level gets called fairly frequently in template-heavy code > that performs a lot of instantiations, and we currently "leak" a lot of > GC memory when compiling such code since [push|pop]_to_top_level() do > not bother reusing or ev

Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-03-03 Thread Manuel López-Ibáñez
On 3 March 2016 at 15:39, Patrick Palka wrote: > On Thu, Mar 3, 2016 at 10:22 AM, Manuel López-Ibáñez > wrote: >> 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 e

Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-03-03 Thread Patrick Palka
On Thu, Mar 3, 2016 at 10:22 AM, Manuel López-Ibáñez 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 fig

Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-03-03 Thread Manuel López-Ibáñez
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

Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-03-03 Thread Patrick Palka
On Thu, Mar 3, 2016 at 9:22 AM, Markus Trippelsdorf wrote: > On 2016.03.03 at 09:16 -0500, Patrick Palka wrote: >> push_to_top_level gets called fairly frequently in template-heavy code >> that performs a lot of instantiations, and we currently "leak" a lot of >> GC memory when compiling such code

Re: [PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-03-03 Thread Markus Trippelsdorf
On 2016.03.03 at 09:16 -0500, Patrick Palka wrote: > push_to_top_level gets called fairly frequently in template-heavy code > that performs a lot of instantiations, and we currently "leak" a lot of > GC memory when compiling such code since [push|pop]_to_top_level() do > not bother reusing or even

[PATCH] Reuse the saved_scope structures allocated by push_to_top_level

2016-03-03 Thread Patrick Palka
push_to_top_level gets called fairly frequently in template-heavy code that performs a lot of instantiations, and we currently "leak" a lot of GC memory when compiling such code since [push|pop]_to_top_level() do not bother reusing or even freeing each saved_scope structure it allocates. This patc