On Tue, 14 Nov 2023 at 00:27, Cassio Neri wrote:
>
> The current implementation calls __detail::__modulo which is relatively
> expensive.
>
> A better implementation is possible if we assume that x.ok() && y.ok() ==
> true,
> so that n = x.c_encoding() - y.c_encoding() is in [-6, 6]. In this case
The current implementation calls __detail::__modulo which is relatively
expensive.
A better implementation is possible if we assume that x.ok() && y.ok() == true,
so that n = x.c_encoding() - y.c_encoding() is in [-6, 6]. In this case, it
suffices to return n >= 0 ? n : n + 7.
The above is allowe