Re: [PATCH] ranger: Optimise irange_union

2021-12-06 Thread Andrew MacLeod via Gcc-patches
On 12/5/21 16:55, Richard Sandiford via Gcc-patches wrote: This gives a ~2% compile-time speed up with the test above. I also tried adding a path for two single-pair ranges, but it wasn't a win. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard Thanks for these

Re: [PATCH] ranger: Optimise irange_union

2021-12-05 Thread Richard Biener via Gcc-patches
On Sun, Dec 5, 2021 at 10:55 PM Richard Sandiford via Gcc-patches wrote: > > When compiling an optabs.ii at -O2 with a release-checking build, > the hottest function in the profile was irange_union. This patch > tries to optimise it a bit. The specific changes are: > > - Use quick_push rather

[PATCH] ranger: Optimise irange_union

2021-12-05 Thread Richard Sandiford via Gcc-patches
When compiling an optabs.ii at -O2 with a release-checking build, the hottest function in the profile was irange_union. This patch tries to optimise it a bit. The specific changes are: - Use quick_push rather than safe_push, since the final number of entries is known in advance. - Avoid