Re: [PATCH] libstdc++: Optimize std::gcd

2024-06-07 Thread Jonathan Wakely
On Fri, 7 Jun 2024 at 19:42, Stephen Face wrote: > > On 6/7/24 2:30 AM, Jonathan Wakely wrote: > > On Fri, 7 Jun 2024 at 09:57, Sam James wrote: > >> > >> Stephen Face writes: > >> > >>> This patch is to optimize the runtime execution of gcd. Mathematically, > >>> it computes with the same algor

Re: [PATCH] libstdc++: Optimize std::gcd

2024-06-07 Thread Stephen Face
On 6/7/24 2:30 AM, Jonathan Wakely wrote: > On Fri, 7 Jun 2024 at 09:57, Sam James wrote: >> >> Stephen Face writes: >> >>> This patch is to optimize the runtime execution of gcd. Mathematically, >>> it computes with the same algorithm as before, but subtractions and >>> branches are rearranged t

Re: [PATCH] libstdc++: Optimize std::gcd

2024-06-07 Thread Jonathan Wakely
On Fri, 7 Jun 2024 at 09:57, Sam James wrote: > > Stephen Face writes: > > > This patch is to optimize the runtime execution of gcd. Mathematically, > > it computes with the same algorithm as before, but subtractions and > > branches are rearranged to encourage generation of code that can use > >

Re: [PATCH] libstdc++: Optimize std::gcd

2024-06-07 Thread Sam James
Stephen Face writes: > This patch is to optimize the runtime execution of gcd. Mathematically, > it computes with the same algorithm as before, but subtractions and > branches are rearranged to encourage generation of code that can use > flags from the subtractions for conditional moves. Addition