This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bz1311954 - multilib variations in LC_COLLATE files, with fixes


20.03.2019 22:07 Carlos O'Donell <codonell@redhat.com> wrote:
> [...]
> I vote for the >> version *and* using 1.5, which simplifies
> the equation to:
> 
> elem_size = next_prime (elem_size + elem_size >> 2);

Off-by-one error:

    elem_size = next_prime (elem_size + elem_size >> 1);

unless you meant 1.25. :-) Shifting is definitely good but won't
the compiler optimize "elem_size / 2" into "elem_size >> 1"?

Regards,

Rafal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]