I've replaced the modulo operator (%) with a bitwise AND operation in the relevant sections of the code.
Upon reviewing the source code, it appears that using AND provides a more consistent and unified approach compared to calculating the remainder. It's worth noting that there are articles suggesting that, in terms of performance, there might not be a significant difference between the two notations when using recent compilers, although I'm not entirely certain about this.
I've replaced the modulo operator (%) with a bitwise AND operation in the relevant sections of the code. Upon reviewing the source code, it appears that using AND provides a more consistent and unified approach compared to calculating the remainder. It's worth noting that there are articles suggesting that, in terms of performance, there might not be a significant difference between the two notations when using recent compilers, although I'm not entirely certain about this.