This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Optimise hash_table::empty
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: gcc-patches at gcc dot gnu dot org, nd at arm dot com, richard dot sandiford at arm dot com
- Date: Fri, 15 Jan 2016 13:19:02 -0500
- Subject: Re: Optimise hash_table::empty
- Authentication-results: sourceware.org; auth=none
- References: <87a8o6k9jp dot fsf at e105548-lin dot cambridge dot arm dot com>
On Fri, Jan 15, 2016 at 06:00:10PM +0000, Richard Sandiford wrote:
> Calling redirect_edge_var_map_empty after each pass was slowing things
> down because hash_table::empty () cleared all slots even if the hash
> table was already empty.
>
> Tested on x86_64-linux-gnu, where it gives a 1% compile time improvement
> for fold-const.ii at -O and -O2. OK to install?
I can't ok, but it looks good to me.
Trev