lhotari commented on issue #21108: URL: https://github.com/apache/pulsar/issues/21108#issuecomment-1702962932
UPDATE: It might be the case that the previous code is fine. The problem with the old code is that it is cryptic. In the original code, `signSafeMod` function's name is misleading. In the cases where the item takes 2 or 4 elements, there's a bitwise shift to left to multiply by 2 (`<< 1`) or 4 (`<< 2`), directly in the `signSafeMod` function. It's bad from maintainability perspective to have functions with names that don't match the implementation. I doubt that using bitwise operations to optimize the speed of execution is worthwhile in Java code. It should be left to the compiler to do such optimizations. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
