Re: Optimise hash_table::empty

2016-01-15 Thread Bernd Schmidt
On 01/15/2016 07:00 PM, 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-

Re: Optimise hash_table::empty

2016-01-15 Thread Trevor Saunders
On Fri, Jan 15, 2016 at 06:00:10PM +, 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

Optimise hash_table::empty

2016-01-15 Thread Richard Sandiford
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? Thanks, Ri