[wide-int] More optimisations

Mike Stump mikestump@comcast.net
Wed Oct 30 03:03:00 GMT 2013


On Oct 29, 2013, at 5:43 AM, Richard Sandiford <rsandifo@linux.vnet.ibm.com> wrote:
> Richard Biener <rguenther@suse.de> writes:
>> 
>> I think the cases Mike added should only be enabled when we can figure
>> them out at compile-time, too.
> 
> Well, the idea with most of these functions was to handle the simple
> "everything is one HWI" cases inline.

Yes.  The idea is that 99.99% of all cases are 1 HWI or less, dynamically.  By inlining and doing those cases inline, provided the code is relatively small, seemed like a win.  This win comes at the cost of duplicative code in the wider path, as it checks the precision/length as well, but slowing down those cases seemed reasonable with respect to how infrequent we expect them.  Now, if the slow path code is the same speed as the inline code would have been, certainly the duplication just hurts.  This is why I was posting the code fragments for the fast path case.  I was aiming for the fast path to be really nice to help ensure that we don't don't slow down compiles on narrow code any.



More information about the Gcc-patches mailing list