Adding link for xref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120264
Thanks, Cassio.
On Mon, 12 May 2025 at 10:06, Jonathan Wakely wrote:
> On Sun, 11 May 2025 at 12:34, Cassio Neri wrote:
> >
> > Hi all,
> >
> > After reflecting on my previous message and Andrew's, I now believe this
> pa
On Sun, 11 May 2025 at 12:34, Cassio Neri wrote:
>
> Hi all,
>
> After reflecting on my previous message and Andrew's, I now believe this
> patch is not the best solution to optimise the day of the week. Instead, the
> optimisation for n % 7 should be done by the compiler depending on the
> pla
Hi all,
After reflecting on my previous message and Andrew's, I now believe this
patch is not the best solution to optimise the day of the week. Instead,
the optimisation for n % 7 should be done by the compiler depending on the
platform.
I'll open a missing optimisation opportunity bug report ag
Thanks Andrew for your prompt reply.
The results below regard my PoC which is as close to the proposed patch as
I could make. This is because I can't have chrono with my patch on godbold
for a comparison between current chrono and patched chrono.
I tried on all platforms that I could make it to c
On Mon, May 5, 2025, 11:48 AM Cassio Neri wrote:
> Use a better algorithm to calculate n % 7, taking into account that the
> divisor
> is a Mersenne number. This is explained in this two-part lightning talk at
> CppCon 2024 [1, 2].
>
> Roughly speaking, the algorithm is used for n = sys_days but
Use a better algorithm to calculate n % 7, taking into account that the divisor
is a Mersenne number. This is explained in this two-part lightning talk at
CppCon 2024 [1, 2].
Roughly speaking, the algorithm is used for n = sys_days but it has a
precondition that doesn't hold for all values of sys_